It occurs in Exodus 33, just after God killed some of the Israelites in a plague (God's 15th Killing) because "of the calf, which Aaron made."
And the LORD plagued the people, because they made the calf, which Aaron made. Exodus 32:35And before God shows Moses his back parts.
And it shall come to pass, while my glory passeth by, that I will put thee in a clift of the rock, and will cover thee with my hand while I pass by. And I will take away mine hand, and thou shalt see my back parts: but my face shall not be seen. 33:22-23After the golden calf affair, God settled down a bit, and promised to lead Moses to a land flowing with milk and honey.
And the LORD said unto Moses, Depart ... Unto a land flowing with milk and honey. 33:1-3aHe said he'd send an angel to drive out (kill?) all the current inhabitants of the land. (Including the Canaanites and the Jebusites)
I will send an angel before thee; and I will drive out the Canaanite, the Amorite, and the Hittite, and the Perizzite, the Hivite, and the Jebusite. 33:2(It turns out that God didn't keep his promise, but that's another story. See Joshua 15:63, 16:10, 17.12-13: Judges 1:21, 27, 3:1-5)
But God said he wouldn't be going with them, since if he did, he'd end up killing the lot of them for being so goddamned "stiffnecked."
I will not go up in the midst of thee; for thou art a stiffnecked people: lest I consume thee in the way. 33:3bWhen the people heard God's promise/threat, they mourned and took off their ornaments.
And when the people heard these evil tidings, they mourned: and no man did put on him his ornaments ... And the children of Israel stripped themselves of their ornaments. 33:4, 6
Which was a good thing, too, since God said he'd kill them all on the spot if he saw any ornaments.
For the LORD had said unto Moses, Say unto the children of Israel, Ye are a stiffnecked people: I will come up into the midst of thee in a moment, and consume thee: therefore now put off thy ornaments from thee, that I may know what to do unto thee." 33.5Because God hates ornaments.
(We already knew that God hates Christmas trees; now we know that he hates ornaments as well.)
(I'm not sure what the ornaments were exactly, but it couldn't have been the gold jewelry that the Israelites stole from the Egyptians, since they'd already given it to Aaron for his golden calf.)