Gagai joined the Knights in 2012 and has played 116 of his 122 NRL matches for Newcastle.
Gagai informed his teammates before joining the Queensland Maroons side in camp on Monday.
"We are obviously disappointed that Dane has decided to leave the Club, but we respect the decision he has made with his family," CEO Matt Gidley said.
"Dane has been a wonderful player and ambassador for our club over the six years he has been with us.
"He will leave at season's end with our best wishes for the future."
"We know Dane will give 100 per cent for the team before he departs us at the end of the year."
Photo: NRL (Newcastle Knights star Dane Gagai).