Raynes, 29, has signed a two-year deal with a further year's option.
He helped Carlisle reach this season's League Two play-off semi-finals.
The ex-Rotherham, Oxford and Scunthorpe defender, who has made 368 league appearances, is manager David Artell's second signing of the week after striker Jordan Bowery joined the Alex.
Find all the latest football transfers on our dedicated page.
Crewe Alexandra have signed defender Michael Raynes from Carlisle United, following his decision to turn down a new offer at Brunton Park.