The 35 year-old was injured during York’s Championship game against Swinton Lions in April.
Cockyane, who was called up to the England squad when he hit career-best form at Trinity in 2013, has proved a popular figure wherever he has played since starting out at Doncaster under the late St John Ellis.
He has thrived in the twilight of his career at York, switching to stand-off and helping them win the League One title last year before helping them flourish in the Championship.
Cockayne said: “After receiving the news that my knee needs reconstruction surgery I’ve decided to call time on my career.
“I’ve been fortunate to play a large amount of my career on the top-tier in the UK.
“In the last 18 months being involved with York City Knights has been a very rewarding and fulfilling part of my career.
“I thoroughly enjoyed my role on the field, none more so than promotion as champions in 2018 against all the odds.
“Not forgetting my move into the half back position that I hadn’t played since my amateur days. It gave me a new lease of life and brought a whole new level of enjoyment to my participation in the sport.
“I had a personal goal to go on and reach 400 appearances.
“Obviously that’s not going to come to fruition but I’m extremely satisfied and proud of the 350 plus appearances I have made in the professional game.”
Cockayne made special mention to Billy Conway, who helped get him his chance at Doncaster after leaving the Army, as well as his former Wakefield coach Richard Agar and Hull KR chairman Neil Hudgell.