Carvajal had not scored for Los Blancos since November 2019, but the fit-again full-back marked his return to the side with a second-half finish any striker would have been proud of.
The Spain's international's strike at at Benito Villamarin was enough for Carlo Ancelotti's side to make it two wins out of three and go joint-top of the table.
Betis had its chances, but Madrid, which remains hopeful of signing Kylian Mbappe before the transfer window closes next week, raised its game in the second half and deserved all three points.
Vinicius Junior was rewarded with a start after his double in the draw against Levante last weekend and the Brazil forward was lively early on.
He burst away down the left before showing great awareness to cut the ball back for Karim Benzema, who flashed a shot just past the far post with his right foot.
Eder Militao tested Rui Silva with a volley before Thibaut Courtois palmed Nabil Fekir's free-kick wide and Martin Montoya failed to hit the target in a promising spell for Betis.
Referee Alejandro Hernandez Hernandez dished out five yellow cards in quick succession – including one to Betis boss Manuel Pellegrini – in the closing stages of a feisty first half.
Benzema had a goal disallowed early in the second half as he had strayed offside, but the France striker set up the opening goal just after the hour mark.
Vinicius showed great pace to keep the ball in play at the byline and found Benzema, whose pinpoint cross was drilled home by the on-rushing Carvajal with his right foot.
Marco Asensio came close to adding a second when he fired wide from just outside the penalty area after a surging run and Eden Hazard was denied by Silva late on. Courtois kept out a shot from Montoya right at the end as Madrid held on for maximum points.