Some books pull you into their orbit, taking you to another world. Susan Conley’s vivid memoir, “The Foremost Good Fortune,” is a case in point. It chronicles her family’s move in 2007 from Portland to Beijing, China, where her husband, Tony, has accepted a job. It also records Conley’s firsthand encounter with breast cancer in a place where medical treatment leaves much to be desired.

Her story is a two-year roller-coaster ride, at once surreal, heartbreaking and very funny.

Welcome to Beijing, the nation’s capital, a dry, flat city of 15 million, where people swarm the streets by foot, car, bike and rickshaw; smog hangs in the air; and pockets of workers, from waitresses to security guards, can be seen marching in formation. Notably missing is the presence of English — anywhere.

Among Conley’s clan, her husband fares best in their new arena. A lifelong Sino-phile, Tony has been to China many times, and is fluent in Mandarin. His job provides a sense of purpose and routine.

Conley and her sons — Aidan, 4, and Thorne, 6 — lack those advantages. As they establish their new lives — the boys enter school, Conley starts Mandarin lessons — homesickness grabs hold. Thorne takes to singing patriotic tunes constantly, even at meals. Aidan has trouble sleeping. And Conley, who lives in the realm of words, feels disconnected, unmoored by the new language.

The author is our proxy in China, navigating the local terrain. Through her, we visit Beijing’s malls and cafes, street markets and, of course, the Great Wall. We meet the housekeeper who wants to capture a homing pigeon from Conley’s window ledge and boil it for dinner. And we meet Rose, Conley’s language tutor, who declares, “The Chinese don’t believe in God. We believe in ourselves We believe in our families and our jobs.”

The Chinese also believe in paperwork — endless documents and permits for all manner of activities. One day, two police officers stop Conley outside her apartment building, requesting her registration papers and passport. Empty-handed, she asks to call her husband. As they follow her inside, they question how long she’s lived there. Alas, her answer, four months, contains China’s unluckiest number. Then they ask her apartment number. “Ba C,” or 8C, gets her off the hook, and the officers leave.

“Maybe it was because they trusted my face,” she says. “More likely, it was because living in an apartment numbered eight, China’s luckiest number, means good luck will find you. This is how it happens every day inside China’s quixotic system of rules. Maybe you’re lucky. Maybe you’re not. And you must learn to live within this arbitrary system and temper your xiwang — your urge to wish it was any different.”

Conley’s luck, however, doesn’t extend to the medical sphere. When she discovers a couple of marble-like lumps in her breast, she makes an appointment at a Beijing hospital. What happens there is a jaw-dropping case of incompetence, which Conley turns to humorous effect. In short, the surgeon who initially dismisses the lumps as meaningless later suggests what Conley dubs “an on-the-spot mastectomy.”

Forthwith the story takes a sharp turn west, as the family heads home for a summer in New England and proper medical care. The author has a mastectomy at Boston’s Massachusetts General Hospital, then a month of radiation at a facility in Bath.

Still, even months after their return to China, Conley remains shell-shocked by the cancer, unable to loosen its grip. The disease and this foreign country have become two sides of the same coin — alien worlds where she feels like an outsider, worst of all, to herself.

Ultimately, though, the author’s wry outlook saves the day, and prevents cancer from dominating a book whose true center is China. By book’s end, the family returns to Maine, as planned, enriched by their Beijing odyssey and sad to leave.

“China has proven to be the greatest road trip,” Conley says, “And the thing about road trips is that they absolve you. Force you to give up control. They allow you to gaze out the window for hours at a time and fiddle with the radio dial and free you of most responsibilities except procuring decent snack food. I don’t want this one to end.

Joan Silverman is a freelance writer living in Kennebunk.