He entered the Danish Parliament in 1872 as a member of Folketinget and held a seat there for the following 23 years. As a member of parliament, he worked for the use of international arbitration to solve conflicts among nations, and it is due to Bajer's efforts that foreign relations became part of the work of the Danish Parliament and that Denmark participated in the Inter-Parliamentary Union from the beginning and earned a distinguished position among its members.