He was born in Meigle in Perthshire the third son of Margaret Lyon and the Reverend James Playfair. He was educated at Dundee Grammar School. His later education was at the University of St Andrews. In 1804 he was commissioned in into the Bengal Horse Artillery. After his commission he was sent to the University of Edinburgh for three months for instruction in range-finding and ballistics. He served in India from 1805 to 1817 and from 1820 to 1834. He was initially based in Calcutta but in November 1806 had to undertake an 800-mile march with his brigade to Cawnpore. In March 1807 General Sir John Horsford placed him in charge of the troops at Bareilly and was required to suppress the robber-chief Tumon Singh in Oudh. In November 1807 he was appointed in charge of the horse artillery in Agra and in 1809 undertook another long march to Saharunpoor. In 1811 he was moved to Meerut and required to oversee the siege of the fortress at Nalapani. He was twice wounded during the siege but successfully captured the fortress. Owing to ill-health he was sent back to Britain to recover. His ship moored at St. Helena en route and he where he met and interviewed Napoleon. His second period of duty in India was much less eventful. In 1834 he retired from the army to St Andrews where he served as Provost from 1842 till his death in 1861. Whilst Provost he is credited with building St Andrews Public Library, agreeing that the railway network be extended to serve the town, and achieving various grants for improvements to St Andrews University. He also revived St Andrews Golf Club which had fallen into disrepair in the 1850s due to under-use. In his time, St Andrews "was transformed into a thriving modern burgh". In 1856 he became a Knight Bachelor, and in the same year was awarded received an honorary doctorate of Doctor of Laws by the University of St Andrews. Playfair took an interest in photography during its pioneer years and worked with Sir David Brewster to develop the calotype process. Though not a member, Playfair was one of the founders of the Edinburgh Calotype Club one of the world's first photographic societies. He was a keen cellist. He died at home in St Andrews on the 19 January 1861, and is buried on the north wall of St Andrews Cathedral churchyard, beneath a distinctive and large white monument, with a military motif.