Xu-Nan joined the Green Party of Aotearoa New Zealand. He was the party's male policy co-convenor from 2020 to 2023 and party co-convenor from 2023.
At the 2020 general election, Xu-Nan contested the Pakuranga electorate and was placed 17th on the Green Party list.[6][7] In 2023 Xu-Nan contested the Epsom electorate. He was placed 16th on the Green Party list, but was ranked too low to win a list seat at the election.[8] Following the death of Efeso Collins on 21 February 2024, Xu-Nan was declared elected as a member of Parliament by the Electoral Commission on 6 March.[9][10]
^Normally, list MPs do not have individual predecessors or successors, but Collins died during a sitting parliament and therefore was succeeded by Xu-Nan.