Mr Trump said Mr Floyd, an unarmed black man allegedly murdered by a Minneapolis police officer, is “looking down” and “saying this a great day”.
Former US Vice-President Joe Biden said the remark was “despicable”.
Mr Trump spoke while celebrating a surprise US jobs rebound and calling for “equal justice under the law”.
Mr Floyd, who was unarmed and in handcuffs, died on 25 May after a policeman knelt on his neck for nearly nine minutes. The officer involved was charged with murder and three colleagues stand accused of aiding and abetting.
The death triggered protests against racial discrimination across the US and world. On Friday, Minneapolis banned the police neck restraint allegedly used on Mr Floyd, and California pledged to follow suit.
What did Trump say?
Speaking in the White House Rose Garden on Friday, Mr Trump said: “Equal justice under the law must mean that every American receives equal treatment in every encounter with law enforcement regardless of race, colour, gender or creed.
“They have to receive fair treatment from law enforcement. They have to receive it.
“We all saw what happened last week. We can’t let that happen.
“Hopefully George is looking down and saying this is a great thing that’s happening for our country. A great day for him. It’s a great day for everybody.”
Mr Trump, a Republican, added: “This is a great, great day in terms of equality.”
The president’s critics said he was crassly suggesting Mr Floyd would be posthumously celebrating positive jobs figures.
Mr Trump’s defenders said the context of his comments make clear he was referring to his call for equal treatment of all Americans by police.
What did Biden say?
The Democratic presidential candidate hit back during a campaign speech in Dover, Delaware.
He said: “George Floyd’s last words, ‘I can’t breathe, I can’t breathe’ echoed all across this nation and quite frankly around the world.
“For the president to try to put any other words in the mouth of George Floyd I frankly think is despicable.”
Mr Biden has been sharpening his attacks on the president as the 3 November White House election looms.
While campaigning in his home state of Delaware on Thursday night, he said Mr Trump brings out the “worst” of some Americans and “there are probably anywhere from 10 to 15 percent of the people out there, they’re just not very good people”.