(CNN) -- By the time he reached the White House, Bill Clinton's appetite was legend. He loved hamburgers, steaks, chicken enchiladas, barbecue and french fries but wasn't too picky. At one campaign stop in New Hampshire, he reportedly bought a dozen doughnuts and was working his way through the box until an aide stopped him.

Former President Clinton now considers himself a vegan. He's dropped more than 20 pounds, and he says he's healthier than ever. His dramatic dietary transformation took almost two decades and came about only after a pair of heart procedures and some advice from a trusted doctor.

His dietary saga began in 1993, when first lady Hillary Clinton decided to inaugurate a new, healthier diet for her husband. In a meeting, she asked Dr. Dean Ornish to work with the White House chefs, who were accustomed to high fat, French cuisine.

What your cholesterol numbers really mean

"The president did like unhealthy foods, and we were able to put soy burgers in White House, for example, and get foods that were delicious and nutritious," said Ornish, director and president of the Preventive Medicine Research Institute in Sausalito, California. Other new menu items included such healthy fare as stir fry vegetables with tofu, and salmon with vegetables.

Ornish: Asking the right questions about health care

Even with the revamped White House menu, Clinton battled his weight throughout his two terms as president. At his annual physical in 1999, the White House physician noted the president had put on 18 pounds since a checkup two years earlier. The prescription: refocus on exercise and a low-calorie diet.

Clinton didn't know it, but weight was not his biggest health concern. The 42nd president has a family history of heart disease, and plaque was building up in the coronary arteries leading to his heart, undetected by White House doctors.

American Heart Association: Learn and live

In 2004, less than four years after leaving office, the 58-year-old Clinton felt what he described as a tightness in his chest as he returned home from New Orleans, where he was promoting his memoir, "My Life." Days later, he underwent quadruple bypass surgery to restore blood flow to his heart.

"I was lucky I did not die of a heart attack," Clinton told CNN's Dr. Sanjay Gupta. After the surgery, the former president cut down on his calories and lowered the cholesterol in his diet, but his heart troubles were not over.

Last year, the former president went to Haiti to support the relief efforts but he felt weak. When he returned home, he learned he needed another heart procedure: two stents to open one of the veins from his bypass surgery, which had become, in Clinton's words, "pretty bent and ugly."

Ornish recalls meeting with Clinton a few days after his angioplasty. "I shared with him that because of his genetics, moderate changes in diet and lifestyle weren't enough to keep his disease from progressing. However, our research showed that more intensive changes change actually reverse progression of heart disease in most people."

Will you have a heart attack? These tests can tell

"I told him, 'The friends that mean the most to me are the ones that tell me what I need to hear, not necessarily what I want to hear. And you need to know your genes are not your fate. And I say this not to blame you but to empower you. And I'm happy to work with you to whatever extent you want,'" Ornish recalled. They met a few days later, he said.

Clinton then decided to make profound changes in the way he eats.

"I essentially concluded that I had played Russian roulette," Clinton said, "because even though I had changed my diet some and cut down on the caloric total of my ingestion and cut back on much of the cholesterol in the food I was eating, I still -- without any scientific basis to support what I did -- was taking in a lot of extra cholesterol without knowing if my body would produce enough of the enzyme to support it, and clearly it didn't or I wouldn't have had that blockage. So that's when I made a decision to really change."

The former president now says he consumes no meat, no dairy, no eggs, almost no oil.

"I like the vegetables, the fruits, the beans, the stuff I eat now," Clinton told Gupta.

The former president's goal is to avoid any food that could damage his blood vessels. His dietary guides are Ornish and Dr. Caldwell Esselstyn Jr., who directs the cardiovascular prevention and reversal program at The Cleveland Clinic Wellness Institute. Both doctors have concluded that a plant-based diet can prevent and, in some cases, actually reverse heart disease.

"All my blood tests are good, and my vital signs are good, and I feel good, and I also have, believe it or not, more energy," Clinton said. His latest goal: getting his weight down to 185, what he weighed when he was 13 years old.

Clinton is trying to spread his newfound zeal for healthy eating to children. The Clinton Foundation has teamed up with the American Heart Association and is helping 12,000 schools promote exercise and offer better lunches so decades from now, today's children will not face the same heart troubles he has.

"It's turning a ship around before it hits the iceberg, but I think we're beginning to turn it around," Clinton said.

Watch Sanjay Gupta MD Saturday at 4:30pm and Sunday at 7:30am ET. For the latest from Sanjay Gupta MD click here.