Kelly deVos had always dreamed of writing a book. And she finally did — after living through her worst nightmare.

In 2013, the graphic designer was at her local airport in Phoenix, en route to a business trip in Salt Lake City.

But, as she was boarding, a flight attendant stopped her.

“They forced me to buy a second seat for $300,” deVos tells The Post. The married mom, who weighed 333 pounds at the time, was told she wouldn’t fit in just one.

Mortified, deVos plunked down her credit card. How would she break it to her boss that her trip expenses had suddenly doubled?

Luckily, she didn’t have to. When that same attendant realized the flight was overbooked, she reclaimed deVos’ second ticket for another passenger. DeVos was reimbursed and left to sit in her single seat, which she fit into, after all.

It was a humiliating experience, but also eye-opening, deVos says.

Until that point, “I had always believed that the best opportunities belonged to thin and perfect people,” deVos, now 43, tells The Post. “But from that day on, I just thought, I’m not going to let my weight hold me back anymore. And, if people don’t like it, that’s their problem.”

When deVos got back home to Gilbert, Ariz., she sat down and started writing about Cookie Vonn, a whip-smart, overweight teen who gets waylaid at an airport after a flight attendant declares her “too fat to fly.”

That project eventually evolved into “Fat Girl on a Plane” (Harlequin), out Tuesday. DeVos’ debut novel follows a young, aspiring fashion designer across two timelines: the“before,” when Cookie is a plus-sized 17-year-old, and the “after” two years later, when she’s dropped the weight via a punishing diet.

In both arcs, Cookie faces challenges. The younger girl lets her size hold her back: opportunities for work, and even love, pass her by. But skinny Cookie has trouble, too. Although she lands her dream job in fashion and shacks up with a sexy designer, childhood wounds still smart, so she lets her boyfriend call the shots.

She’s also always — always — hungry.

“Fat or thin, [Cookie] always had the capability to achieve her dreams,” deVos explains. But she says real transformation isn’t about body shape — she needed to master the art of self-possession.

That’s the message she hopes readers take away from the book: “Go for it. Just live your best life.”

Still, deVos understands it’s difficult for young women today to maintain healthy body image. Her own daughter, Evelyn, has struggled: Last year, the 15-year-old admitted to skipping lunch at school to lose weight.

“That was very difficult for me, as a parent and as a person who is fat myself,” says deVos. At home, “we have to make an effort to keep the channels of communication [around body image] really open.”

That’s why deVos isn’t keeping her recent gastric sleeve surgery a secret. Her reasons for getting the surgery, she explains, were physical, not emotional: About a year ago, she was diagnosed with Type 2 diabetes, a blood sugar disorder that’s linked to obesity and raises the risk of infection, heart attack and stroke.

Her doctor sent her home with several diabetes medications, but they were expensive and the side effects (nausea, fatigue) made deVos feel sicker. So, in February 2018, she went under the knife. Since then, she says she’s dropped around 60 pounds, has gotten her diabetes under control and feels healthy.

Her body may have changed, but her message hasn’t. DeVos wants her teenage readers to know that it’s their right to make their own decisions about their bodies — including to remain fat, which she finds perfectly acceptable.

“You don’t always have to be involved in some weight-loss story,” deVos says. “You can be both fat and happy.”