During the presidential campaign, Michael D. Cohen got a Google alert for a breaking story: “Russian President Vladimir Putin Praises Donald Trump as ‘Talented’ and ‘Very Colorful.’”

For most American politicians, that article in December 2015 would hardly have been welcome news. But Mr. Cohen, whose role as personal lawyer and fixer for President Trump has been firmly rooted in the transactional world of his boss, saw opportunity. He emailed an old friend who had been talking about seeking Kremlin support to build a Trump Tower in Moscow, and sent him the article.

“Now is the time,” Mr. Cohen wrote. “Call me.”

Mr. Cohen’s efforts put him under scrutiny in the Trump-Russia inquiries and hinted at the somewhat murky space he occupied in the Trump Organization, where his precise duties were unclear. Since then, a series of disclosures have revealed the unusual range of Mr. Cohen’s portfolio.

Agents at the Federal Bureau of Investigation raided his office and hotel room on Monday, seeking records related to payments made shortly before the 2016 election to two women who claimed to have had sexual encounters with Mr. Trump. The investigation poses a legal threat to Mr. Cohen — and possibly his client. Few people closer to Mr. Trump have more knowledge of what the president has been involved with over the years.