The former Cleveland Browns and Carolina Panthers quarterback was brought into the squad on Tuesday as cover for injured starter Matthew Stafford, and he capped off a memorable debut with a game-winning touchdown pass to Van Jefferson with 10 seconds left on the clock.
Victory looked far from the Rams' grasp in the first half as the Raiders opened up a 13-3 advantage at the break, while the home side's offence floundered.
Los Angeles's odds went from bad to worse at the start of the fourth quarter when Daniel Carson's third field goal of the night pushed the Raiders lead to 13.
But Mayfield responded well, finally clicking with his receivers to lead a 17-play drive which culminated in a one-yard touchdown run for Cam Akers.
The Rams defence then did their job, stopping the Raiders from scoring and keeping the window of victory ever so slightly open.
Mayfield then battled the clock as well as the opposing defence, but kept his composure to again lead his new team downfield and find Jefferson in the end zone on a 26-yard reception to seal the thrilling victory.