The 49ers announced the move Saturday ahead of Sunday's regular-season finale against the St. Louis Rams.
Coach Jim Harbaugh has been coy all week about what would transpire with the receiving corps in the wake of Braylon Edwards' abrupt release earlier this week. Hastings' addition ends speculation about a possible Terrell Owens-49ers reunion, though it always seemed like a long shot.
Hastings is expected to see extensive action in St. Louis, where the 49ers (12-3) would lock up the No. 2 seed and a first-round bye in the playoffs with a win.
"He's going to get it done. No matter how he's got to get it done, he's going to get it done," Ginn told the San Francisco Chronicle on Friday. "Some guys just have a certain way they carry themselves. And Joe was never afraid of us. He came in, and he always asked questions. He always stuck around because he wanted to know what was going on."
Hastings set single-season school records in receptions (87) and receiving yards (1,546) in his senior season at Washburn.