Labour is calling for an investigation after the prime minister accused Sadiq Khan of leaving a "black hole" in Transport for London's (TfL's) funding during a Downing Street press briefing.
Boris Johnson accused the mayor of London of "blowing" TfL's finances with an "irresponsible fares policy".
Mr Khan dismissed the remarks as "lies".
Labour has written to the Cabinet Secretary Simon Case to investigate if Mr Johnson broke the ministerial code.
The remarks were made from Downing Street during the pre-election purdah for the London mayoral election on 6 May.
During purdah the government is required to limit announcements that might influence the outcome of an election.
In a letter to Mr Case, Labour's Deputy Leader Angela Rayner, said the ministerial code "clearly states that official facilities and resources may not be used for the dissemination of party political material".
Asked at Monday's coronavirus press conference about potential government support for London's pandemic recovery, the prime minister said: "As for the finances of TfL, I must respectfully remind you that I left them in robust good order.
"And it is not through any fault of my own that the current Labour mayor decided to blow them on an irresponsible fares policy.
"We're doing our best to help them out and will continue to do so.
"And I'm afraid there was a black hole in TfL's finances even before Covid began."
Mr Khan said he had reduced TfL's deficit by "more than 71% before the pandemic".
Mr Khan said: "I think it is inappropriate for all of us to follow the rules and abide by the rules, and Boris Johnson to yet again break the rules in the way he's done.
"Firstly, during the purdah period using a government platform to attack a Labour candidate.
"But secondly, to tell lies."