The former McLaren and Renault driver achieved a career-high ninth in the drivers' standings for Haas in 2018. He has five points this season.
Haas did not say who is going to replace Magnussen.
"I'm proud to have raced for such a great team of people these last few years," he said. "While I'm looking forward to the next chapter of my racing career, I remain fully focused on giving everything I've got for the rest of 2024."
On the eve of the Hungarian Grand Prix, team principal Ayao Komatsu said he hopes they can "find a way to keep working together in some capacity."
News of Magnussen's departure came after Oliver Bearman signed a multiyear deal with Haas from 2025 onward. The 19-year old British driver will take the seat vacated by German driver Nico Hulkenberg, who is joining Sauber at the end of the year ahead of its rebranding to Audi for 2026.