Gultan Kisanak was held at the local airport, while Firat Anli was arrested at his home in the south-eastern city.
President Recep Tayyip Erdogan has vowed to prosecute local officials accused of links to the banned Kurdistan Workers' Party (PKK).
In September, 28 elected mayors in largely Kurdish towns were sacked.
They were replaced by trustees appointed by the government using an emergency law that came into force following a failed army-led coup in July.
The pro-Kurdish Peoples' Democratic Party (HDP), whose mayors were principally affected, condemned September's sackings as a "coup by trustees".
The PKK was formed in the late 1970s and launched an armed struggle against the Turkish government in 1984, calling for an independent Kurdish state within Turkey.
Since then, more than 40,000 people have died.
In the 1990s, the organisation rolled back on its demands for an independent Kurdish state, calling instead for more autonomy for the Kurds.
Last year, a ceasefire reached in 2013 appeared to be over when Turkey launched air strikes against PKK camps in northern Iraq.
The co-mayors of Diyarbakir, Turkey's largest Kurdish-majority city, have been detained as part of a terrorism investigation, security officials say.