Harry Harpham's widow Gill Furniss received 14,087 votes, a majority of 9,590 and a 6% increase in Labour's share of the vote.
Mr Harpham had been elected in the 2015 General Election.
Ms Furniss said her victory was an "emphatic message" for David Cameron about "unfair" spending cuts.
The full results were:
Gill Furniss, Labour, 14,087
Steven Winstone, UKIP, 4,497
Shaffaq Mohammed, Liberal Democrat, 1,385
Spencer Pitfield, Conservative, 1,267
Christine Gilligan, Green, 938
Stevie Manion, Yorkshire First, 349
Bobby Smith, Give Me Back Elmo, 58
Turnout was 33% compared with 55% in 2015.
Ms Furniss said: "Tonight the people of Sheffield Brightside and Hillsborough have sent David Cameron an emphatic message: Mr Cameron we have had enough of your uncaring government. We have had enough of your Tory government's unfair cuts which have hit communities like ours in Sheffield so much more than affluent areas."
Mr Harpham was 61 and was a former miner in Nottinghamshire and previously deputy leader of Sheffield City Council. He was elected after former home secretary David Blunkett announced his intention to stand down. Mr Harpham received 22,663 votes, a majority of 13,807.
The widow of a Labour MP who died from cancer has won a by-election to replace him in the Sheffield Brightside and Hillsborough constituency.