They kept not the covenant of God
Either the covenant of circumcision, which was neglected during their travels through the wilderness, ( Joshua 5:5 ) or the covenant made with the people of Israel at Mount Sinai, ( Exodus 24:7 ) and this is to be understood not of the children of Ephraim only, but of the Israelites in general, who in many instances broke the covenant, and were not steadfast in it, ( Psalms 78:37 ) , (See Gill on Jeremiah 31:32)
and refused to walk in his law;
the law of God, which was given forth by him, by the disposition of angels, through the hands of a mediator, Moses, as a rule of their walk and conversation; but they refused to order their conversation according to it, being unwilling to be subject to it, but despised and cast it away; a sad instance of the corruption of human nature, and the depravity of man's will, boasted of for its freedom, yet what is common, and to be observed in all mankind.