Local Government Act Article 82

If a mayor of a special municipality, magistrate/mayor, mayor of township/city, or chief of village resigns, is removed from office, or in the event of their death, the Executive Yuan shall appoint an acting mayor of the special municipality; the Ministry of the Interior shall request that the Executive Yuan to appoint an acting magistrate/mayor; the county government shall appoint an acting mayor of township/city; the township/city office shall appoint an acting chief of village.If a mayor of a special municipality is suspended from their position, the deputy mayor shall become the acting mayor. If the position of the deputy mayor is vacant or if the deputy mayor is unable become the acting mayor, the Executive Yuan shall appoint an acting mayor. If a magistrate/mayor is suspended from their position, the deputy magistrate/mayor shall become the acting magistrate/mayor. If the position of the deputy magistrate/mayor is vacant or if the deputy magistrate/mayor is unable become the acting magistrate/mayor, the Ministry of the Interior shall request that the Executive Yuan to appoint an acting magistrate/mayor. If a mayor of township/city is suspended from their position, the county government shall appoint an acting mayor; if there is a deputy mayor, the deputy mayor shall become the acting mayor. If a chief of village is suspended from their position, the township/city office shall appoint an acting chief of village.The acting mayor of a special municipality, magistrate/mayor, mayor of a township/city, or chief of village detailed in the preceding two (2) paragraphs shall not be the spouse, former spouse, relative by blood within the fourth degree or relative by marriage within the third degree of kinship of the original office holder.If a mayor of a special municipality, magistrate/mayor, mayor of township/city, or chief of village resigns, is removed from office, or in the event of their death, a supplementary election shall be completed within three (3) months from the day of such event. However, if the remaining term is not more than two (2) years, no supplementary election shall be held. The acting mayor of the special municipality, magistrate/mayor, mayor of a township/city, or chief of village shall serve until the expiration of the current term of office.The winner of the aforementioned supplementary election shall take their oath of office within ten (10) days from the announcement of the successful election. The term of office shall be until the expiration of the current term and shall be counted as one term of office.The resignations stipulated in Paragraph 1 shall be carried out in writing. Mayors of special municipalities shall tender their resignation with and receive approval from the Executive Yuan; magistrates/mayors shall tender their resignation with the Ministry of the Interior, which shall in turn submit the resignation to the Executive Yuan for approval; mayors of the township/city shall tender their resignation with and receive approval from the county government; chiefs of village shall tender their resignation with and receive approval from the township/city office or the district office. Resignations shall take effect on the day the resignation is approved.
中文原文 地方制度法第82條
直轄市長、縣(市)長、鄉(鎮、市)長及村(里)長辭職、去職、死亡者,直轄市長由行政院派員代理;縣(市)長由內政部報請行政院派員代理;鄉(鎮、市)長由縣政府派員代理;村(里)長由鄉(鎮、市、區)公所派員代理。
直轄市長停職者,由副市長代理,副市長出缺或不能代理者,由行政院派員代理。
縣(市)長停職者,由副縣(市)長代理,副縣(市)長出缺或不能代理者,由內政部報請行政院派員代理。
鄉(鎮、市)長停職者,由縣政府派員代理,置有副市長者,由副市長代理。
村(里)長停職者,由鄉(鎮、市、區)公所派員代理。
前二項之代理人,不得為被代理者之配偶、前配偶、四親等內之血親、三親等內之姻親關係。
直轄市長、縣(市)長、鄉(鎮、市)長及村(里)長辭職、去職或死亡者,應自事實發生之日起三個月內完成補選。
但所遺任期不足二年者,不再補選,由代理人代理至該屆任期屆滿為止。
前項補選之當選人應於公告當選後十日內宣誓就職,其任期以補足該屆所遺任期為限,並視為一屆。
第一項人員之辭職,應以書面為之。
直轄市長應向行政院提出並經核准;縣(市)長應向內政部提出,由內政部轉報行政院核准;鄉(鎮、市)長應向縣政府提出並經核准;村(里)長應向鄉(鎮、市、區)公所提出並經核准,均自核准辭職日生效。

English translation for reference only; the Chinese text prevails. Not legal advice.