Alexander Frolov also scored and Craig Conroy had two assists for the Kings, who won for only the second time in their last 11 games and snapped a five-game losing streak after returning from a four-game road trip. Mathieu Garon made 28 saves.
Brendan Shanahan scored for the Rangers, who were 0-for-9 on the power play. The loss was their first on the road against the Kings since March 9, 2000.
Los Angeles led 2-0 through one period after outshooting New York 21-5 with the help of five power plays, one of which led to Sopel's second goal of the game and fourth this season. He had only two in 68 games last season with the Kings and New York Islanders before undergoing surgery on his right knee in May.
Sopel, who missed the previous two games with a sore foot after blocking a shot in Wednesday's loss at Minnesota, opened the scoring at 5:06 of the first period with the teams skating 4-on-4. His one-timer from 50 feet deflected off the right skate of Rangers centre Blair Betts in the high slot and flew over goalie Henrik Lundqvist's glove.
Sopel scored again at 10:52 with 35 seconds still remaining on Marek Malik's hooking penalty. He got a cross-ice pass from Conroy, and his fluttering one-timer from 45 feet above the left circle beat Lundqvist between the legs.
Frolov made it 3-0 at 1:31 of the period, redirecting Conroy's centring feed past Lundqvist for his fourth goal this season.
The Rangers scored on a wrist shot by Shanahan from the middle of the right circle that caught the short side past Garon's stick. It was Shanahan's 10th goal of the season and 608th of his career, tying Dino Ciccarelli for 13th place all-time and putting him within two of Bobby Hull's total.
The Kings responded less than two minutes later with a goal by Avery.
Notes: The Rangers played their first game at Staples Center since Dec. 31, 2003. ... The attendance was 17,236 - 882 short of a sellout. It was the first time a Rangers-Kings game at Los Angeles did not draw a full house since Nov. 2, 1995, when 14,358 showed up at the 16,005-seat Forum. ... Kings Hall of Fame broadcaster Bob Miller has written a book chronicling his favourite anecdotes from 34 seasons behind the microphone. ... Avery received a minor penalty for diving with 6:58 left, after Jaromir Jagr shoved him lightly from behind at the Rangers' blue line.