Shortly before leaving the Federal Bureau of Investigation in 2006, after a swashbuckling undercover career that would later help catapult him into Congress, a young agent named Michael G. Grimm went into real estate, investing roughly $1 million of borrowed money in a luxury development in Texas.

Seeking a builder to cooperate on the project, Mr. Grimm chose a former F.B.I. agent who had served with him in New York — even though the former agent was under indictment on state racketeering and fraud charges, according to court and property records.

The former agent, Carlos Luquis, was soon convicted for his role in skimming $2 million from Texans’ electric bills, and served 18 months in prison.

Yet Mr. Grimm went on to do business with Mr. Luquis and his wife in two other companies, records show. And during Mr. Grimm’s successful insurgent campaign for Congress in 2010, Mr. Luquis was frequently at his side.