The Hammers are desperately short of defensive options due to a string of injuries and Johnson could make his debut in Wednesday's Capital One Cup semi-final first leg at Manchester City.
A statement on the club's official website read: "West Ham United are pleased to confirm the signing of centre-back Roger Johnson on loan for the remainder of the 2013/14 season."
West Ham defender Winston Reid has been sidelined since early November and was joined in the treatment room by centre-backs James Collins and James Tomkins.
Johnson, who has been on loan at Sheffield Wednesday since September, will be hoping for a happier spell in the top-flight after suffering relegation with Birmingham and Wolves.
He joins the Hammers in the midst of another survival fight, with the east Londoners sitting second from bottom and three points adrift of safety.