The former home of the Royal Marines Museum will be converted into a five star hotel after being sold for £4.5m.
The building in Eastney in Portsmouth closed in 2017 amid concerns over its poor condition and the risk of exhibits being damaged.
The National Museum of the Royal Navy (NMRN) is planning a new museum at Portsmouth's Historic Dockyard.
Director General Dominic Tweddle called the sale a "huge milestone" for the project.
The building was purchased by Grand Hotel Excelsior International Ltd.
Helen Hubbard, speaking for the group, said the luxury hotel would bring employment to the area and "preserve the building's historic attributes, appeal, and timeless décor".
The Yomper, a statue of a Royal Marine in the Falklands conflict, will remain at its entrance.
Mr Tweddle said he was "delighted" that the "historic fabric of the building will be maintained".
He said the exhibits were moved to a facility at the dockyard shortly before lockdown in a "herculean effort" by staff and volunteers.
The collection will open to the public next year, as part of a £2m investment to safeguard it until the new museum is ready.
The project has so far failed to secure National Lottery funding.
Mr Tweddle said the decision to close the building "was not an easy one".
He said: "It is clearly something that is very close to the heart of the Royal Marines and the local community.
"However, the age of the building meant that it simply wasn't a safe environment in which to store our historic collections leaving them at risk of damage or even ruin.
"In addition the space, whilst beautiful, would have been extremely difficult to configure modern museum displays and for visitors to move around easily.
"The cost to have overcome all of those issues would have been extraordinary."