First lady Michelle Obama says her plan to plant a high-profile vegetable garden at the White House left her with last-minute worries that it would flop.

“What if the seeds or seedlings were not set in correctly and we ended up with empty beds? What if we couldn’t control the weeds?” She recounts her trepidation in her first book, “American Grown: The Story of the White House Kitchen Garden and Gardens Across America.” The book was published Tuesday by Crown Publishing.

Obama organized the planting of the garden three years ago as part of her campaign to improve the quality and nutrition of the diet of Americans, particularly children. The garden occupies a once-grassy corner of the South Lawn and was planted with the help of 23 fifth-graders from Bancroft Elementary School in the District. Originally 1,100 square feet, the garden now covers 1,500 square feet, and it provides food for White House luncheons, the Obama family’s meals and state dinners. About a third of the produce is given to a local food bank.

While legions of locavore activists urged the Obamas to create the first substantive vegetable garden at the White House since Eleanor Roosevelt established a victory garden during World War II, the first lady writes that she hatched the idea early in her husband’s presidential bid. “I thought to myself, if something amazing happened, if my husband — then very much the underdog in the race — actually won, then as first lady I might want to focus on this issue more broadly. That night, it occurred to me that planting a garden at the White House — a garden where children could learn about growing and preparing fresh, nutritious food — could be one small way to get started.”

She said she earlier began to focus on the diets of her daughters, Malia and Sasha, when their pediatrician told her that some of his patients ate every meal at a convenience-food chain.

First Lady Michelle Obama on the cover of her book ‘American Grown: The Story of the White House Kitchen Garden and Gardens Across America.’ (Quentin Bacon Photography/AP)

Obama, a novice gardener when she began the project, said her early worries about creating one of the world’s most famous vegetable plots were unfounded: “The garden took. As I had hoped, it also became a learning garden, and the garden team and I were among its first pupils.” The garden is tended by White House horticulturists, chefs and employees who volunteer. Organic farmer Jim Crawford of Hustontown, Pa., served as a consultant.

As Obama discovered, home gardening is a series of triumphs and setbacks. In the first season, she found that the growing beds were so wide that people had to step into them, the plant spacing was sometimes too tight and rainstorms eroded carefully prepared beds.

“Whatever detours or bumps in the road we would face, I was determined that this garden would succeed,” she writes. Part of that success, she says, is that the garden “helped us start a new conversation about the food we eat and how it affects our children’s health.”

The book also contains seasonal growing advice as well as recipes developed by White House chefs. Proceeds from the $30 book go to the National Park Foundation.

An electronic version is available for $14.99.