WASHINGTON — Soon after he retired last year as one of the leading liberals in Congress, former Representative William D. Delahunt of Massachusetts started his own lobbying firm with an office on the 16th floor of a Boston skyscraper. One of his first clients was a small coastal town that has agreed to pay him $15,000 a month for help in developing a wind energy project.

Amid the revolving door of congressmen-turned-lobbyists, there is nothing particularly remarkable about Mr. Delahunt’s transition, except for one thing. While in Congress, he personally earmarked $1.7 million for the same energy project.

So today, his firm, the Delahunt Group, stands to collect $90,000 or more for six months of work from the town of Hull, on Massachusetts Bay, with 80 percent of it coming from the pot of money he created through a pair of Energy Department grants in his final term in office, records and interviews show.

Experts in federal earmarking — a practice of financing pet projects that has been forsaken by many members of Congress as a toxic symbol of political abuse — said they could not recall a case in which a former lawmaker stood to benefit so directly from an earmark he had authorized. Mr. Delahunt’s firm is seeking a review of the arrangement from the Energy Department.