Unidentified gunmen stormed the property at 01:00 local time (05:00 GMT), interim PM Claude Joseph said.
He has called for calm and declared a state of emergency nationwide.
Mr Moïse had led Haiti, one of the poorest nations in the world, since 2017 but had faced widespread protests demanding his resignation.
The nation’s recent history has been plagued by coups, political instability and widespread gang violence.
UK Prime Minister Boris Johnson tweeted that he was “saddened at the death of Mr Moïse”, calling it “an abhorrent act” and appealing for calm. US President Joe Biden offered condolences to the people of Haiti for the “horrific assassination”.
First Lady Martine Moïse later reportedly arrived by plane in Fort Lauderdale, south Florida, for treatment. There is no official word on her condition.
Who will take control?
Mr Joseph called the shooting of the president a “heinous, inhuman and barbaric act”, saying the attackers were “foreigners who spoke English and Spanish”. Haiti’s official languages are Creole and French.
Some reports spoke of men dressed in black carrying high-powered weapons who may have pretended to be part of a US drug enforcement operation, although no official details have been given.
Haiti’s ambassador to the US, Bocchit Edmond, said there was “no way” US drugs agents carried out the attack. He believed it was the work of “professional mercenaries”.
Addressing the nation, Mr Joseph vowed the killers would be brought to justice and said the security situation was “under control”.
The state of emergency, or “state of siege”, allows for the banning of gatherings and use of the military for police roles, along with other extensions of executive powers.
Mr Joseph said that “all measures have been taken to ensure continuity” and that “democracy and the republic will win”.
But questions remain about how much control Mr Joseph can assert.
Haiti’s constitution says ministers, under the leadership of the prime minister, take control in the event of presidential vacancy until elections can be called.
But that also remains unclear, as a new prime minister, Ariel Henry, was named by Mr Moïse just this week but has yet to be sworn in.
The US later said it believed elections should go ahead this year, to bring about a peaceful transfer of power.
The US has been Haiti’s biggest donor for 50 years but has had a fractious relationship with some of its rulers and has carried out a number of blockades and interventions.
The country has also had strong counter-narcotics ties with Haiti to try to prevent South American drugs being shipped through the nation and on to the US.
The streets of Port-au-Prince appeared to be mostly calm on Wednesday.
One resident, Pascale Solages, told the BBC: “We are on our cell phones, our radio, our television, waiting for what happens next… everyone is scared.”
The neighbouring Dominican Republic ordered the “immediate closure” of its border with Haiti.
source : BBC.co.uk