Harvie, who has previously played on loan for Dumbarton, moves to Somerset Park from Aberdeen as Ian McCall's men prepare for life back in the Ladbrokes Championship.
McCall told the Ayr website: “There were four or five left-backs available this summer, however Daniel was our first choice. He has already played a full season in the Championship so has experience of the league.
“The clinching factor for me was that Derek McInnes offered him another contract at Aberdeen but he turned it down as he wanted to play first-team football and that showed real guts.”