Law will be able to play for the Third Division winners from September when the club's 18-month transfer embargo comes to an end.
The 25-year-old has spent the last two years at Fir Park helping Motherwell to reach the preliminary rounds of European competition.
And Law insists he is quite happy to drop into the lower levels the Scottish Football League with his new club after recent talks with the Rangers manager Ally McCoist.
"It has maybe taken a few people by surprise that I'm here but I'm looking forward to the season ahead now," Law said.
"I learned of the interest in me quite a while back and in the last few weeks it has grown a bit more. I spoke to the manager before and we had a really good chat.
"When I left the meeting I had with him, I felt then that I knew where I wanted to go and I pretty much made the choice then that if we could make it happen, I would like join Rangers.
"Thankfully it has happened and I'm here now. The fact the team isn't in the SPL any more doesn't put me off and you'll see that with the other new players hopefully coming in too."