Left-back McQueen had a career blighted by injury, making just 29 appearances for Southampton.
He had not played since suffering a serious knee problem while on loan at Boro in October 2018.
Saints were trying to get him back to full fitness but knew it was always going to be an uphill battle, with boss Ralph Hasenhuttl claiming in April it would be a miracle if ever played again.
A Southampton statement read: “Everyone at Southampton Football Club would like to issue their heartfelt thanks to Sam for his incredible commitment and efforts as a Saints player, as well as for the way he has conducted himself off the pitch.
“He will continue to have our support and will be a shining example for all young players coming through the club's Academy.
“We wish him the very best for the future and have no doubt he will be successful in whatever he chooses to do."