John Hepburn was the 2nd son of George Hepburn of Athelstaneford, near the town of Haddington and his wife Helen Hepburn, daughter of Adam Hepburn of Smeaton. He probably studied at St Andrews in 1615, and then travelled to France with his friend, Robert Monro visiting Paris and Poitiers. Hepburn was one of the many thousands of Scots who served in the Thirty Years' War. In 1620 Sir Andrew Gray began to levy forces for the support of Queen Elizabeth of Bohemia, and he established his camp on Hepburn family property at Monkrig. John joined Gray's forces, leaving Scotland in May 1620, and thereafter commanded a company of pikes who served as the personal guard to the exiled King of Bohemia. After the defeat at White Mountain Gray's forces united with Count Ernst Mansfeldt's troops, and by 1622 Hepburn held the rank of captain. He served during the battles of Bergen op Zoom in July and of Fleurus in August 1622. It was after Mansfeld's forces were disbanded in 1623 that Hepburn and his troops entered Swedish service.