Unidentified gunmen stormed the property at 01:00 local time (05:00 GMT), interim PM Claude Joseph said.
He called for calm, saying that "all measures had been taken to guarantee the continuity of the state".
Mr Moïse had been in power since 2017 but had faced widespread protests demanding his resignation.
Mr Joseph called the shooting of the president a "heinous, inhuman and barbaric act", saying the attackers spoke "English and Spanish". He gave no further details.
He said the situation in the impoverished Caribbean nation was under control, adding: "Democracy and the republic will win."
The streets of the capital appeared to be largely empty on Wednesday morning, but questions remain about how much control Mr Joseph can assert in a nation plagued by political instability and gang violence.
The neighbouring Dominican Republic ordered the "immediate closure" of its border with Haiti.
UK Prime Minister Boris Johnson tweeted that he was "shocked and saddened at the death of Mr Moïse", calling it "an abhorrent act" and appealing for calm. The White House called the killing a "horrific crime".