Michael Cohen told special counsel Robert Mueller he lied to Congress to play down President Trump’s involvement during the 2016 campaign in efforts to build a Trump Tower in Moscow, raising the pressure on his former boss as investigators probe his business relationship with Russia.

In a surprise court hearing Thursday, Mr. Cohen pleaded guilty to one charge brought by Mr. Mueller’s office of lying to Congress about the Russian real-estate project, saying he purposely minimized Mr. Trump’s connection to the project. It was the first time Mr. Cohen, who served as Mr. Trump’s self-described fixer for more than a decade, has been publicly implicated in the Mueller investigation.

Before a crowded courtroom at the U.S. District Court in Manhattan, Mr. Cohen said he submitted false written statements to Congress in August 2017, including assertions that he’d had “limited” discussions about the proposed real-estate deal with Mr. Trump, identified in the charging document as “Individual 1.” The discussions were, in fact, “more extensive,” Mr. Cohen said in court.

After Mr. Cohen’s court appearance Thursday, Mr. Trump called him a “weak person” and accused him of lying to get a reduced sentence. Mr. Trump said he had opted not to do the Moscow project because he was “focused on running for president.”

During the campaign, Mr. Cohen asked Mr. Trump if he wanted to travel to Russia to pursue the project, Mr. Cohen said, and consulted a senior campaign official about it. He said he had lied when he told Congress he “never considered asking” Mr. Trump to make the trip.