The 24-year-old Josh is Stuart McCall's first close-season signing following a spell with the Conference Premier side Alfreton Town, who are managed by his father, Nicholas. Before joining Rangers last summer, elder brother Nicky was a key part of the Motherwell team who qualified for Europe on two successive occasions and he gave Josh glowing references about life at the club.
Law, who impressed during training stints at Fir Park last season, said: "When my brother was up here for the two years I came up to watch as many games as I could. I really enjoyed it and I am ready to test myself at this level.
"I am a similar type of player to Nicky, I play anywhere across the midfield and I like to get the ball and play. I look to get about the pitch and hopefully bring some assists and chip in with a few goals as well.
"My brother speaks really highly of Stuart [McCall], Kenny [Black] and the rest of the coaching staff here. I had a couple of other good options down south, but I wanted to give it a go at this level."
McCall, who confirmed the departure of Motherwell favourite James McFadden earlier this week, was delighted to announce the signing of another creative force.
"We had Josh up for training several times last season to look at him and we think he'll really add something to the squad. He's a midfielder who likes to get on the ball and create. We are really pleased to have him here and I am sure he will add something a bit different."