The 29-year-old Tigers academy product made his first team debut in July, 2010 and is in his testimonial season.
He has made more than 250 Super League appearances and featured in finals at Wembley and Old Trafford.
Milner began his career as a hooker, but later switched to the loose-forward role and was a key member of the Tigers squad which finished top of Betfred Super League four years ago.
Leeds United ‘would have taken’ four points from two games according to Alan Shearer
Leeds United U21 2-2 Norwich City U21 highlights: Joseph and Perkins score again
Leeds United ‘have not’ approached pair but in transfer ‘talks’
Rodrigo makes 'sleeping' Leeds United admission and declares action plan after Whites punishment
Leeds United in ‘talks’ with MLS star as Man Utd eye deal for Whites goalkeeper
He said he is “buzzing” to have signed a new deal.
“To get another two years at this fantastic club is something I hold really highly,” Milner stated.
“I’m excited for what’s to come.”
The Wakefield-born forward, who played his junior rugby with Stanley Rangers, was capped by England in 2018 and credited Tigers coach Daryl Powell with taking his game to “the next level”.
He said: “It has not always been plain sailing with him.
“We’ve had our battles, which he would probably say himself, but there are not many coaches who can get the ultimate best out of your rugby career and I’m thankful for what he has done for me.
“In 2018 I got to represent my country which he had a massive helping hand in, along with his fellow coaching staff at the time Ryan Sheridan and Danny Orr.
“Everyone at this club has helped to get me to where I am.”
The next two seasons will be under different management, with ex-Hull boss Lee Radford coming in to take over when Powell joins Warrington Wolves this autumn.
It will be Tigers’ first change of coach since 2013, when Powell replaced Ian Millward and Milner said: “It excites me.
“We are getting a new coach in Lee who will bring new, fresh ideas in
“I’m looking forward to it.”
Both Powell and Radford have welcomed Milner’s latest deal.
Powell said: “Adam has been a great servant to the club and in my time at Cas he has grown to be an international player.
“He would want to do more of that and hopefully, he can continue to grow.
“Anyone who makes it to a testimonial at a club has done an awesome job and he is a quality player, but also a great bloke.
“I’m really pleased for both him and the club that he’ll be staying longer.”
Radford confirmed he regards Milner as a key member of Tigers’ squad in 2022 and 2023.
“Adam has been a stalwart for Castleford for the last couple of years, a really important piece of the jigsaw.” he noted.
He is a local lad who is ingrained in the club by coming through the ranks.
“It was a terrific achievement for him to reach 250 top-flight games and hopefully has got plenty left in him as well.
“I’m really looking forward to getting to work with him.”
Support the YEP and become a subscriber today. Enjoy unlimited access to local news and the latest on Leeds United, With a digital subscription, you see fewer ads, enjoy faster load times, and get access to exclusive newsletters and content. Click here to subscribe.