The doctors were on a strike since May 19 after two of their colleagues were allegedly assaulted by the relatives of a patient following her death while undergoing a treatment.
The striking doctors demanded sufficient security in the hospital to protect them against any outrage by patients' relatives.
"Our main concern is security of doctors which has been assured of and we have decided to resume duty," said Dr Akash Mane, General Secretary, Maharashtra Association of Resident Doctors (MARD).
Maharashtra Medical Education Minister Girish Mahajan met with the dean of J J hospital and the officers of the Directorate of Medical Education and Research (DMER).
He also met a delegation of the protesting doctors.
"We have decided to beef up security and some staff is deployed in the hospital. An alarm system will be set up inside the hospital wards so that doctors can seek protection. The resident doctors can use it. I am happy that doctors have resumed duty," the minister said.
They said that hospitals were provided security guards following similar incidents earlier, but these personnel were manning the entrances.
Two resident doctors, including a woman, of the J J Hospital, located in south Mumbai's Byculla area, were allegedly assaulted by the relatives of Zaida Sanaullah Sheikh, 45, after she died while undergoing a treatment there.
The accused were identified as Mohd Altaf Anulahak Shaikh ,32, Sony Sanahullah Shah, 23, Rihan Sanaullah Shah, 22 and Salima Khatun Sanaullah Shah, 20.
The police had registered a case under the relevant sections of the Indian Penal Code (IPC) and Maharashtra Medical Practitioners Service Act, 2010, and arrested four people in connection with the incident.
They were later remanded to judicial custody till May 31.
Election Results for Lok Sabha Election 2019 will be out on May 23. Get the latest election news and live updates on ndtv.com/elections. Catch all the action on NDTV Live. Like us on Facebook or follow us on Twitter and Instagram for news updates from each of the 543 parliamentary seats for the election 2019