Ferguson, 19, was released by Blackburn Rovers in the summer and joined Matlock for pre-season.
Last season, he had a spell on loan in the NPL at Witton Albion.
He now moves to Marine and could make his debut against South Shields on Saturday.
Matlock manager Paul Phillips said: “Joe’s been offered a more lucrative deal at Marine which obviously gives him more financial security.
“We wanted to keep the lad but there’s a budget we need to stay within. He’s a good player and he leaves with our best wishes for the future.”
Keep up-to-date with our exclusive email newsletters.
Subscribe