2017–2023: Leading roles
In 2017, Kim starred in her first leading role in KBS2's romantic comedy drama Fight for My Way, portraying Choi Ae-ra, a department store information desk employee aspiring to become an announcer, alongside Park Seo-joon. The series was noted for its portrayal of young adults facing career challenges and concluded with ratings of 13.8%. Kim won the Excellence Award at the 2017 KBS Drama Awards for her performance.
In 2018, Kim appeared in the period comedy-mystery film Detective K: Secret of the Living Dead, playing a woman with memory loss involved in an investigation. That same year, Kim and her Descendants of the Sun co-star Jin Goo made cameo appearances in the historical drama Mr. Sunshine.
In 2019, Kim starred in the historical fantasy drama Arthdal Chronicles as Tanya, the spiritual leader and successor of the Wahan tribe's priesthood. The drama served as a reunion with Song Joong-ki, following their appearance in the 2016 series Descendants of the Sun. In December, Kim's contract with King Kong Entertainment expired, and she chose not to renew it.
In February 2020, Kim signed with Salt Entertainment. Later that year, she starred in the romance web series Lovestruck in the City, portraying Lee Eun-oh, a woman living under a false identity who becomes involved in a complex urban romance. For the role, Kim underwent surfing training and overcame her childhood aquaphobia.
In 2022, Kim starred in the slice-of-life drama My Liberation Notes, portraying Yeom Mi-jeong, an introverted office worker struggling to escape her monotonous life. She was nominated for Best Actress – Television at the 59th Baeksang Arts Awards for her performance in the series. In June, Kim's contract with Salt Entertainment expired, and she chose not to renew it. In September, she signed with HighZium Studio.