The shot came in a caustic tweet by Davis after Giuliani said the president faced no danger if Cohen cooperates with federal prosecutors and tells "the truth."
Davis wrote in a tweet that putting the words "Trump" and "Giuliani" next to the word "truth" is equivalent to an "oxymoron." Davis also added the line, "Stay tuned."
Davis was responding to Giuliani's comments Sunday regarding speculation that Cohen — who had been Trump's longtime personal lawyer — would begin cooperating with federal prosecutors in New York City conducting a criminal investigation of Cohen.
Giuliani did not immediately respond to a request for comment on Davis' shot at him and the president.
The former Mayor of New York City, appearing on the ABC News' show "This Week" on Sunday, had been asked about Trump's reaction to a recent interview Cohen did with ABC News in which he pointedly said, "My wife, my daughter and my son have my first loyalty, and always will."
"I put my family first," Cohen had said.
Those remarks gained widespread attention because Cohen once said, "I’m the guy who would take a bullet for the president."
Days after Cohen spoke with ABC News, he hired Davis, who had previously been a lawyer for President Bill Clinton, and who remains close to both Clinton and his wife, Hillary Clinton. Cohen also hired Guy Petrillo, a former top staffer in the United States Attorney's Office for the Southern District of New York, the same office that is now probing Cohen.
The hirings and Cohen's comments to ABC were seen as potentially setting the stage for him to cut a deal with prosecutors and cooperate with them in exchange for leniency in any criminal case.
On Sunday, Giuliani said Trump's reaction to Cohen's comments were "same as mine, which is fine."
"Michael Cohen should cooperate with the government," Giuliani added. "We have no reason to believe he did anything wrong. The president did nothing wrong with him."
Asked if he had any concerns about what Cohen might tell a prosecutor, Giuliani said, "Zero. None."
"As long as he tells the truth ... we're home free," said Giuliani, who is currently representing the president in connection with a probe of the Trump campaign by special counsel Robert Mueller.
That investigation, which is focused on Russian interference in the 2016 presidential election and possible collusion with that effort by the Trump campaign, is separate from the probe of Cohen. Trump has repeatedly denied there was any collusion and has called Mueller's investigation a "witch hunt."
Davis declined to comment Monday when contacted by CNBC about his tweet referring to Trump and Giuliani.
Davis referred questions to Petrillo, who did not immediately respond to a request for comment.
Cohen has not been charged with any crime. The investigation is related to his business dealings as well as to a $130,000 payment he made to porn star Stormy Daniels on the eve of the presidential election, in which Trump defeated Hillary Clinton.
Daniels has said the payment was in exchange for her silence about a sexual encounter she had with Trump in 2006. The White House has denied any such affair. But Trump has admitted he reimbursed Cohen for his hush money payment to Daniels.