KABUL—Taliban leader Mullah Mohammad Omar has for the first time publicly backed peace talks aimed at ending Afghanistan’s 14-year war, even as he urged his men to carry on fighting.

In an address released on Wednesday in the run up to the Eid al-Fitr Islamic holiday, the insurgent leader said that “peaceful pathways” aimed at pursuing the movement’s twin goals of fighting foreign occupation and establishing an Islamic system were legitimate.

...