The beginning of the World War I, in July 1914, found him serving his military service in Kragujevac. After the outbreak of the war, he was assigned to the First Company of the Second Battalion of the Fifth Infantry Regiment of the Drina Division. With this unit, he took part in the battles on the Cer and Drina, during the summer and early autumn of 1914. Leković distinguished himself in these battles with his courage, and he also captured several enemy soldiers. After the Battle of Kolubara and the victorious offensive of the Serbian army, he broke out with his unit on the Sava, near Obrenovac. Then a great epidemic of typhus began, so Petar fell ill with typhus. After recovering, he returned home briefly, but soon returned to his unit.