The findings in the Journal of the American Medical Association (JAMA) Internal Medicine were based on a sample of more than one million people whose records were analyzed from 2011 to 2014.
Those with female doctors were significantly less likely to die within 30 days of admission, or to be readmitted within 30 days of discharge.
If men could achieve the same success as women in this realm, researchers estimated that there would be 32,000 fewer deaths each year among Medicare patients alone, a group that includes people over 65.
"The difference in mortality rates surprised us," said lead author Yusuke Tsugawa, research associate in the Department of Health Policy and Management at Harvard University's T H Chan School of Public Health.
More From This Section
"The gender of the physician appears to be particularly significant for the sickest patients."
The study was described as the first national assessment of its kind to compare outcomes among patients of female and male doctors.
It found that patients treated by a female physician had a four percent lower relative risk of dying prematurely compared to those treated by men.
"The association was seen across a wide variety of clinical conditions and variations in severity of illness," said the report.
The study did not delve into the reasons for the differences.
However, previous research has shown that female doctors tend to follow clinical guidelines more closely than men, and that women provide more patient-centered communication.
A better understanding of the different approaches is now more important than ever, said senior author Ashish Jha, professor of health policy and director of the Harvard Global Health Institute.
"We need to understand why female physicians have lower mortality so that all patients can have the best possible outcomes, irrespective of the gender of their physician."
Female physicians now account for approximately one third of doctors in the United States, and about half of all US medical school graduates.