RICHMOND, British Columbia — Melody Bai arrived in Vancouver from China in the late stages of pregnancy with one goal: to give birth to a Canadian baby.

Awaiting her was an elaborate ecosystem catering to pregnant women from China, including a spacious “baby house” where she spent four months, attended to by a Mandarin-speaking housekeeper.

Caregivers offered free breast massages to promote lactation, outings to the mall, lectures on childbirth with other Chinese mothers-to-be and excursions for high tea.

“It’s an investment in my child’s education,” Ms. Bai, a 28-year-old flight attendant, said by phone from Shanghai, months after returning to China with her newborn and passport in hand. “We chose Canada because of its better natural and social environment.”