The idiom is on the lam, not on the lamb. The exact origins of this sense of lam are unknown, but it’s believed to be a late 19th-century U.S. slang term. It was originally a verb meaning to escape, and it’s still occasionally used in that sense, but today it mostly functions as a noun. To be on the lam is to escape, to flee justice, or to be in hiding from law enforcement.
Examples
On the lamb, a misspelling, is common—for example:
A 30-year-old woman on the lamb from a New Jersey mental institution becomes the queen of Madison Avenue. [Broadway World]
Finding himself suddenly on the lamb from fascist “timekeepers,” Will makes a half-assed attempt to go into hiding … [Crave Online]
But most careful writers know to use on the lam—for example:
An accused East Coast mobster, on the lam for more than 10 years, was found by the FBI in an unlikely occupation and location … [New York Daily News]
Mr. Israel, who went on the lam briefly, is currently serving a 22-year prison sentence. [Wall Street Journal]
Brosnan then attempts to pin the killing on the shallow, silly, former Dead Head Vanderveer who is forced to go on the lam to clear himself. [CultureMap]

