In January 2022, she resigned from YTN and transitioned into politics, joining the election campaign committee of Lee Jae-myung, the presidential candidate of the Democratic Party of Korea, where she served as a spokesperson.
In the 2024 South Korean legislative election, Ahn received a strategic nomination to run in the Seoul Dobong District 1 constituency.
[5] Ahead of the 2024 South Korean legislative election, incumbent In Jae-keun announced that she would not be running for re-election in the Dobong A constituency.
[8][9] Kim's victory was notable, as he was one of only three People Power Party candidates to win in Seoul constituencies north of the Han River.
[10] In November 2024, Ahn Gwi-ryeong was fined 700,000 Korean won for violating the Public Official Election Act.