Judge Francis had been due to rule on whether there was enough new evidence to allow the parents to take the baby...
A lawyer representing Gard's parents Connie Yates and Chris Gard told judge Nicholas Francis at London's High Court that "time had run out" and they had made their decision after seeing the 11-month-old's latest brain scans.
Judge Francis had been due to rule on whether there was enough new evidence to allow the parents to take the baby, who suffers from a rare genetic disorder, to the US for a type of treatment that has never been used on a human being.
But the couple broke down in tears as their lawyer Grant Armstrong told the court: "It is no longer in Charlie's best interest to pursue this course of treatment."
"Charlie has suffered severe muscular atrophy" and "the damage to his muscles was irreversible," he added.
British doctors believe Gard's brain damage is "severe and irreversible" and have said the baby "may be suffering".
The couple had fought a long legal fight to allow them to take their child out of London's Great Ormond Street Hospital, but lost in both Britain's Supreme Court and the European Court of Human Rights in Strasbourg.
The ruling led to the intervention of both US President Donald Trump and Pope Francis, who offered to help the baby.
Charlie suffers from a rare form of mitochondrial disease, which causes progressive muscle weakness in the heart and other key organs.
Scores of supporters holding blue balloons gathered outside the court for Monday's hearing, with Armstrong saying the parents now "want to establish a foundation for Charlie's voice to be heard".
Judge Francis paid tribute to the parents "for the love and the care they gave to their child Charlie".
"No parents could have done more for their child," he said.