Reflecting on his August visit to Libya, strife-torn since a war and the eventual toppling of longtime dictator Moamer Kadhafi in 2011, Johnson said British businesses wanted to invest in the city of Sirte.
"They have got a brilliant vision to turn Sirte into the next Dubai," he told Conservatives attending the party's annual conference in Manchester, talking up its "bone-white sands, beautiful sea" and "brilliant young people".
"The only thing they have got to do is clear the dead bodies away," he added, before laughing.
His comments on Sirte, from where Islamic State militants were driven out in December, were slammed by shadow foreign secretary Emily Thornberry.
More From This Section
"For Boris Johnson to treat those deaths as a joke -- a mere inconvenience before UK business people can turn the city into a beach resort -- is unbelievably crass, callous and cruel," said Thornberry, a Labour MP.
"There comes a time when the buffoonery needs to stop, because if Boris Johnson thinks the bodies of those brave government soldiers and innocent civilians killed in Sirte are a suitable subject for throwaway humour, he does not belong in the office of foreign secretary," she added.
MP Jo Swinson, the Liberal Democrats foreign affairs chief, said Johnson lacked the diplomatic skills necessary for his role and called on Prime Minister Theresa May to fire him.
"This latest unbelievably crass and insensitive comment about an issue of such importance is further proof Boris is not up to the job. May needs to get her house in order and sack him," Swinson said yesterday.
Johnson later turned to Twitter to defend his comments, accusing people "with no knowledge or understanding of Libya" of wanting to "play politics with the appallingly dangerous reality in Sirte".
"That's why Britain is playing a key role in reconstruction and why I have visited Libya twice this year in support," he said in a series of tweets.
Johnson's appointment last year as Britain's top diplomat has added a global dimension to his gaffes, at a sensitive time as the country negotiates its exit from the European Union.