The 20-year-old central defender who hails from Liverpool becomes the third signing of the summer transfer window, following the additions of Jordan Rossiter from Fleetwood Town and Port Vale wing-back James Gibbons.
Cardiff had activated a clause to extend his stay in South Wales after initially joining on a one-year deal but now they have allowed him to depart after not making an appearance for their senior team.
Glen Williams, a journalist for Wales Online that covers Cardiff, says that his new deal involved a six figure release clause which the Gas were happy to meet to bring him back.
James first joined Rovers on loan from Championship club Cardiff City in January 2022 and made his Gas debut the very same day in a Third Round defeat to Peterborough United in the Emirates FA Cup, just hours after he was announced.
He would build up a formidable centre-back partnership with Stoke City loanee Connor Taylor in the Rovers' defence during the second half of the 2021/22 League Two season, recording a number of clean sheets.
Connolly played 24 times in League Two for Joey Barton's promotion-winning side last campaign, in what was his first season in senior professional football after captaining the Under 23’s side at the Cardiff City Stadium.
He also scored the first professional goal of his career in a memorable 3-1 away victory against Port Vale on Easter Monday in April after meeting an Antony Evans cross to put Rovers 2-1 up after they had fallen behind early on.
On his return to Rovers, he said: "I am absolutely over the moon to sign for Rovers. Last year couldn't have gone any better for me, with the way the team performed and also how the fans took to me straight away. Now I'm looking forward to getting back to it - it's a step up into League One but we can't wait to carry on where we left off and have another great season."
Joey Barton said: “We are delighted to get James back with us. He was a key part of our promotion success last season. His arrival on loan in January coincided with the team going on a run of 16 wins, six draws and just three defeats.
“At just 20, his performances and presence amongst our squad defied his age and, once we understood that there was an opportunity to secure his signature permanently, we have moved quickly to close off that deal with Cardiff City.
“James has huge potential and we are excited to support his continual improvement to help our team be successful now that he’s officially a Bristol Rovers player.”