The Prime Minister was expected to press US President Joe Biden to keep his forces on the ground past August 31, as they are providing security at Kabul airport to allow people to flee the country.
But following an emergency meeting of G7 leaders, chaired by the PM on Tuesday afternoon, Mr Biden said the deadline remained in place.
It is understood that the President addressed G7 leaders, including Mr Johnson, Emmanuel Macron and Angela Merkel, on a virtual call for around seven minutes.
Mr Johnson said: “We will go right up until the last minute that we can but you’ve heard what the President of the United States has said, you’ve heard what the Taliban have said.”
He added that there were “harrowing scenes” at Kabul airport for those attempting to flee the approaching Taliban.
“We have evacuated 9,000, the UK alone has taken 9,000 people out of Kabul, I think 57 flights – huge, huge effort by our military,” the Prime Minister told broadcasters.
He added: “We’re confident we can get thousands more out, but the situation at the airport is not getting any better.”
He said leaders had agreed the “number one condition” after August 31 was that the Taliban must grant “safe passage for those who want to come out”.
Meanwhile, a Taliban spokesman urged the US not to “encourage” highly skilled people to leave Afghanistan.
Zabihullah Mujahid told a press conference in Kabul that the US should not be removing “our doctors, engineers, our educated elite” from the country.
According to translation on Sky News, he said: “We need those people in the country, we do not want them out of the country to work in their institutions.”
He added: “August 31 is the time given and after that it’s something that is against the agreement.
“All people should be removed prior to that date.
“After that we do not allow them, it will not be allowed in our country, we will take a different stance.”