The World Health Organization said tests conducted in Ghana came back positive on July 10, but the results had to be verified by a laboratory in Senegal for the cases to be considered confirmed.
"Further testing at the Institute Pasteur in Dakar, Senegal has corroborated the results," Ghana Health Service (GHS) said in a statement.
The two patients in southern Ghana's Ashanti region both had symptoms including diarrhea, fever, nausea and vomiting, before dying in hospital, the WHO said.
GHS is working to reduce any risk of the virus spreading, including the isolation of all identified contacts, none of whom have developed any symptoms so far, it said.
This is only the second outbreak of Marburg in West Africa. The first ever case of the virus in the region was detected last year in Guinea, with no further cases identified.
"(Ghanaian) health authorities have responded swiftly, getting a head start preparing for a possible outbreak. This is good because without immediate and decisive action, Marburg can easily get out of hand," said Matshidiso Moeti, WHO Regional Director for Africa.
There have been a dozen major Marburg outbreaks since 1967, mostly in southern and eastern Africa. Fatality rates have varied from 24% to 88% in past outbreaks depending on the virus strain and case management, according to the WHO.
It is transmitted to people from fruit bats and spreads among humans through direct contact with the bodily fluids of infected people, surfaces and materials, the WHO says.