Duchniewicz ran as the Social Democratic candidate in the
Medininkai constituency in the
2020 parliamentary election. He finished second, with 14.91 percent of the vote, while the constituency was won by
Czesław Olszewski, representing the
Electoral Action of Poles in Lithuania, in the first round with 55.82 percent of the vote. In the
2023 municipal elections, he ran for Mayor of Vilnius District Municipality as the Social Democratic candidate. The municipality had been ruled by the Electoral Action of Poles (and its predecessor, the
Association of Poles in Lithuania) since 1990, with permanent majorities in the municipal council. As the incumbent mayor since 2004,
Maria Rekść, refused to run for reelection, the LLRA-KŠS candidate was the party's vice-chairman
Waldemar Urban. In an upset, Urban only won 46.63 percent of the vote, as opposed to Duchniewicz's 24.84 percent of the vote. Duchniewicz was endorsed by Lithuanian parties and politicians across the political spectrum, including
Prime Minister Ingrida Šimonytė and the "Centre-Right Coalition" in the Vilnius District Municipal Council (a joint electoral list by the
Homeland Union,
Liberals' Movement and
Freedom Party). He ran as a candidate of change after three decades of rule by the LLRA-LŠS, and organized an active campaign.
Waldemar Tomaszewski attacked him rhetorically for his inexperience, and the chairman of LLRA-KŠS expressed his certainty in Urban's victory. In mayor election's second round, Duchniewicz narrowly won with 50.2 percent of the vote, and stated that this is a victory for "all of Lithuania". At 31 years old, he was the youngest mayor elected in the 2023 municipal election. After three months of negotiations and conflict, Duchniewicz signed a
confidence and supply agreement with the majority Polish Electoral Action group in the municipal council on 8 June 2023. This prompted the Centre-Right Coalition to declare themselves the official opposition, in spite of Duchniewicz's insistence of forming a local government "without an opposition group". ==Political positions==