Ward made three senior appearances for Liverpool, with loan spells at Morecambe, Aberdeen and Huddersfield, prior to a £12.5m move to Leicester in 2018.
Ward has 44 Wales caps, but has been back-up to Karl Darlow in the current World Cup qualifying campaign, having most recently started for Craig Bellamy’s side in the Nations League against Iceland in November 2024.
Ward will compete for the Wrexham goalkeeper’s spot with Arthur Okonkwo and Callum Burton as the north Wales club step up to the second tier for the first time in 43 years.
“We’re delighted to welcome Danny back to Wrexham,” manager Phil Parkinson said.
“He’s a keeper with a lot of experience and he’s going to be a great addition to the squad.”