It became a law in Mexico to have a passport a little over a year ago. My husband forgot his passport about 6 months ago, he was detained for about an hour before he was allowed to cross into the US. It always depends on who stops you and what mood they are in.
You are saying two different things. A law in Mexico??? You mean in the US to cross FROM Mexico? First of all, they passed a passport requirement for crossing the border on land (i.e. not by sea or air), but it was NOT a law. If you can prove beyond a reasonable doubt that you are a US citizen, the longest they can legally detain you is 24 hours, and we have yet to hear about that happening at the Lukeville border, at least for an actual American.
Since this border requirement--not an law--went into effect in July of 2008 or so, I've gone back and forth at least two-dozen times with only my AZ DL and a birth certificate. I used to get the two-minute speech about getting my passport, but now they don't even bother. Sure, get your passport, whatever, but it is NOT a law. (That said, if I was not a green-eyed Irish boy, I probably would be hassled more often and long ago would have gotten the passport to save my fellow vacationers any delays at the border.)
As far as going into Mexico, they are concerned mostly about stolen vehicles, smuggling weapons, etc., not about proof of citizenship.