A resolution on the issue passed at the annual meeting in Edinburgh, Scotland, Sky News reported.
It was introduced by Dr. Aseem Molhatra, a cardiologist.
"The obesity epidemic represents a public health crisis, but it is a public health scandal that by legitimizing junk food hospitals have themselves become a risk factor for diet related disease by perpetuating the revolving door of healthcare," Molhatra said. "It's time to stop selling sickness in the hospital grounds."
Molhatra said easy availability of junk food is bad for hospital employees, with half of the 1.4 million people who work for the National Health Service classified as overweight or obese.
Dr. Johnny Marshall, head of policy for the NHS, told Sky News he believes providing familiar food at hospitals helps patients. He said healthy choices are available at hospital eateries.
Dennis Rodman pledges to end trips to North Korea
Interpol investigating stolen passports on missing flight