"After 3 1/2 years, our wonderful Sarah Huckabee Sanders will be leaving the White House at the end of the month and going home to the Great State of Arkansas," Trump said. "She is a very special person with extraordinary talents, who has done an incredible job! I hope she decides to run for Governor of Arkansas - she would be fantastic. Sarah, thank you for a job well done!"
The president has not yet named a replacement for the position.
Trump's announcement came moments before he made remarks at a White House event on its "Second Chance" program boosting hiring of criminals who have served their sentences.
"We've been through a lot together and she's tough, but she's good," Trump said at the event Thursday.
Sanders called serving the president an "honor of a lifetime" and said she "couldn't be prouder" of the administration's work.
"I've loved every minute, even the hard minutes," Sanders said at the event, calling her role the "most special experience" of her life second only to being a mom of three.
Sanders later tweeted saying she is "blessed and forever grateful to @realDonaldTrump for the opportunity to serve and proud of everything he's accomplished. I love the President and my job. The most important job I'll ever have is being a mom to my kids and it's time for us to go home. Thank you Mr. President!"
Sanders, 36, and the daughter of former Arkansas Republican Gov. Mike Huckabee worked on her father’s presidential campaign during the 2016 Republican primary until he dropped out of the race. She then joined the Trump campaign and, subsequently, the Trump administration as a White House communications aide. She was promoted to White House press secretary in 2017, after the president’s first top spokesman, Sean Spicer, resigned from the position.
If she chooses to follow in her father's footsteps the seat for governor opens up in 2022.
Throughout her tenure at the White House, Sanders has come under fierce criticism from members of the press for being dishonest on the president's behalf during press briefings that were often contentious and emotional. Eventually, the press secretary stopped giving daily briefings altogether at the suggestion of the president who said the press covered her “rudely and inaccurately.”.
“I'm going to continue to be one of the most outspoken and loyal supporters of the president and his agenda and I know he's going to have an incredible six more years and get a lot more done,” Sanders said.
Huckabee also tweeted about the news of Sander's departure, taking the opportunity to praise his daughter calling her "a great one" and joking that he says that "with as much objectivity as Fake News CNN has towards @POTUS."
Fox News' Alex Pappas contributed to this report.