Ben Arfa is due to have a medical in France on Monday before joining Nice on undisclosed terms, but will make the move as a free agent.
A Newcastle statement said: "Newcastle United can today confirm that Hatem Ben Arfa and the club have reached an agreement to terminate the contract between both parties with immediate effect by mutual consent. Newcastle United wishes Hatem all the best for his future."
Ben Arfa joined Newcastle from Marseille in 2010, initially on loan before signing permanently the following summer despite an injury-ruined first season in England.
But his attitude and fitness came under question and he joined Hull on loan in September of this season.
He made only a handful of appearances for the East Yorkshire club, failing to score and missing a glorious chance in their defeat to Tottenham, and he was substituted in the first half of the defeat to Manchester United.