A lawyer in the city Corporation Counsel’s office was busted for allegedly forging a judge’s signature as part of a brazen real-estate fraud scheme.

Ironically, the high-stakes fakery took place just months after Hugh Zuber reportedly lectured a group of school kids about the importance of staying out of trouble.

“That life of crime from (the movie) ‘American Gangster’ doesn’t pay, so don’t do it,” Zuber told the students at Pougkeepsie Middle School, according to the weeklybeat.net Web site.

According to the complaint filed in Manhattan Federal court Tuesday, Zuber, 38, conned a client into selling a Bronx property to a company he secretly controlled with his sister in February 2007, shortly before he was hired by the city.

Zuber convinced the victim to take $400,000 in cash and a $550,000 promissory note, then financed the deal with a $705,000 mortgage fraudulently obtained by his Alana Property Management firm, court papers allege.

Zuber — who also pocketed $55,000 in legal fees from the seller — allegedly made about six months of payments before defaulting on both the mortgage and the note.

In an attempt to cover up the scheme, Zuber allegedly created a slew of phony court documents showing that Alana had gone bankrupt, including one bearing the purported signature of Brooklyn Bankruptcy Court Chief Judge Carla Craig.

He allegedly handed over the bogus paperwork during a meeting last year inside his Law Department office, where he was busted yesterday morning by the FBI.

A spokeswoman for the Corporation Counsel’s office said Zuber — who’s currently undergoing counseling for a gambling problem — had been suspended without pay from his $79,250-a-year job.