The Budapest-born Stein studied Sanskrit, Old Persian, Indology and philology at the universities of Vienna, Leipzig and Tübingen, and map-making as part of his military service in Budapest, before setting out for a career in India. His formal positions from 1888 onwards were as registrar of Punjab University and principal of the Oriental College, Lahore and principal of the Calcutta Madrasah. But his real passion was the exploration of Central Asia, China, India and the Middle East.