SÃO PAULO, Brazil—Inhabitants of this megacity, suffering through the worst drought in decades, have unwittingly contributed to an outbreak of dengue fever by storing scarce water in open containers.

The tropical mosquito-borne virus, which often results in high fever, intense muscle pain and convulsions, has killed at least 17 people in São Paulo state in the first six weeks of 2015. That’s up from just three deaths through mid-February of 2014, according to national health officials. Suspected cases have surged tenfold to...