A Glaswegian schoolteacher, in 1886 Todd became one of the first students at the Edinburgh School of Medicine for Women after hearing that the Scottish Royal College of Physicians and Surgeons had opened their exams to women. She took eight years to complete the four-year course because, using the pseudonym Graham Travers, during her studies she wrote a novel, Mona Maclean, Medical Student. This was described by Punch magazine as "a novel with a purpose — no recommendation for a novel, more especially when the purpose selected is that of demonstrating the indispensability of women-doctors". After graduating in 1894 she took her MD in Brussels and was appointed Assistant Medical Officer at Edinburgh Hospital and Dispensary for Women and Children but retired after five years.
Her first book having been exceptionally well received and into further editions, she published Fellow Travellers and Kirsty O’ The Mill Toun in 1896, followed by Windyhaugh in 1898, always using her male pen name, although by 1896 reviewers were calling her "Miss Travers". By 1906 even her publishers added "Margaret Todd, MD" in parentheses after her pseudonym. In addition to six novels she wrote short stories for magazines.
Despite their nineteen-year age difference, Todd was the romantic partner of Dr Sophia Louisa Jex-Blake, founder of Dr Todd's university and place of employment. Upon Jex-Blake's retirement in 1899, they moved to Windydene, Mark Cross, where Dr Todd wrote the novels The Way of Escape in 1902 and Growth in 1906. After Dr Jex-Blake died she wrote, under her own name, The Life of Dr Sophia Jex-Blake, a book described as ‘almost too laboriously minute for the general reader’.