Morsy made 31 appearances for Boro in the Championship last season and had started three of their first five league games this term.
Yet the arrivals of Martin Payero and James Lea Siliki means the Teessiders have more options in midfield, with Jonny Howson and Paddy McNair also available in the engine room.
It’s understood Morsy was happy to stay at Boro, yet the club opted to sell in order to bring other players in.
The Egyptian international joined the Teessiders from Wigan in 2020 and was captain at the DW Stadium when Paul Cook was in charge.
Cook has since taken over at Ipswich, who have been busy this summer as they look to win promotion from League One.
Earlier on deadline day, The Tractor Boys completed the signing of long-term signing Bersant Celina on season-long loan from French club Dijon
Reacting to Morsy’s arrival, Cook told Ipswich’s website: “I’m absolutely delighted. My relationship with Samy is there for everyone to see dating back to when we were at Chesterfield together.
"Samy, again, has been a long-term target. He’s someone that we have had to be patient with and wait to bring in similarly to Bersant Celina. They were both long-term targets and we’re absolutely delighted to have them both at the Club.
"I can only thank Mark Ashton and the owners for their continued backing for bringing in a strong character and a good player like Samy Morsy."