"We need you there," Johnson told Biden.
"Oh, we're going to be there," the president replied. "With bells on, as they say."
Beginning at the end of October, the UN COP26 climate conference in Glasgow is viewed as a critical moment for the world to halt global warming. Under Biden, the United States has renewed pledges to cut greenhouse gases and promised to finance projects to combat climate change.
"It's fantastic to see the United States really stepping up and showing a lead - a real, real lead," Johnson said.
Trump, a Republican, had pulled the United States out of the Paris climate accord. Biden brought the country back into the international treaty after he came into office in January.
The president said the two leaders would discuss trade in their meeting. Britain is eager to seal a U.S.-U.K. trade deal.
"We're going to talk about trade a little bit today, and we're going to have to work that through," Biden said.
Johnson took the Amtrak train from the UN General Assembly in New York to Washington for the White House get-together.
"They love you," Johnson said to Biden, seemingly referring to the U.S. railway staff. "Well, they should," replied Biden, a regular train commuter for more than 30 years, to laughter.
Johnson's team regards the visit as a triumph, demonstrating that Britain can thrive on the world stage after its divorce last year from the European Union.
The meeting comes amid a U.S. rift with EU rival France, in which Britain played a crucial part. A submarine deal the United States and Britain recently announced with Australia came at France's expense, prompting France to withdraw its ambassadors to the United States and Australia and cancel a defense meeting with Britain.
An easy relationship between the two men was not guaranteed. Biden, then vice president under Barack Obama, was angered in 2016 by Johnson's comments suggesting Obama was opposed to Britain's exit from the EU because he was "part Kenyan."
But the leaders met amicably in June at a G7 meeting and seemed to share a comfortable rapport in the Oval Office on Tuesday, calling each other by their first names.
Still, the White House did not agree to hold a formal news conference with Johnson, and the British leader caught U.S. officials off guard by taking questions from reporters in the Oval Office himself.
Johnson called on two reporters from the British press corps while Biden did not call on any from the U.S. side. The press was ushered out afterwards amid loud yelling from White House press aides.
A post-Brexit trade deal is important to Britain, and Johnson noted that the U.S. government had lifted a ban on imports of British beef imposed after an outbreak of mad cow disease.
"And we're going to be working on lamb, too," Biden said.
(Reporting by Jeff Mason, Trevor Hunnicutt, Elizabeth Piper and Nandita Bose; Editing by Heather Timmons, Robert Birsel and Karishma Singh) ((firstname.lastname@example.org; +1 646 223 7914; twitter.com/trhunnicutt; Reuters Messaging: email@example.com))