The 22-year-old joins Killie for the 2022/23 season, while committing his future to the Ibrox club until 2024.
Mayo, who has 11 Scotland Under-21 caps, spent last campaign on loan at Partick Thistle, playing 36 times.
It was the second time he had been on loan at Firhill, with a stint at Dunfermline Athletic in between. He has still to make his debut for the Rangers first-team.
“Lewis started really well in his loan spell with Patrick last season and showed signs that he’s clearing improving,” he told the Kilmarnock website.
"We look forward to working closely with him to develop him and I’m sure he’ll help us in the challenges ahead.”