With none out in a 3-3 game, Ellis attempted to advance Trent Oeltjen, who drew a leadoff walk off Brandon Lyon, and Reed Johnson, who reached first on a bunt single after a sacrifice attempt.
"They asked me to put a bunt down and get those guys over," said Ellis, whose fourth-inning RBI single gave the Dodgers a 3-0 lead. "I was able to get that down and advance the guys."
Ellis did more than just that. Lyon threw the ball low past first into right field, allowing both runners to score and Ellis to reach third.
"I could see from where I was running that the ball got through [second baseman Jeff] Keppinger. I saw it right away and tried to get everybody's attention to start running."
Oeltjen and Johnson scored easily, especially after Hunter Pence's throw from right field sailed way past home plate. Ellis scored on James Loney's double to right-center to make it 6-3.
The Dodgers provided starter John Ely with a 3-0 lead after a three-run fourth that was triggered by Casey Blake's 15th home run of the season off Astros starter Wandy Rodriguez.
Blake's opening at-bat in the first inning led to Torre being tossed by home-plate umpire Paul Emmel. After Blake was called out on strikes looking for the second out, Torre barked from the dugout and was ejected.
"I didn't curse," Torre said. "When he said he had enough, I said, 'Then get it right,' and he threw me out."
After his ejection, Torre came to home plate and discussed matters with Emmel.
"I still didn't curse," the skipper said. "What am I going to do? I'm just going to make a fool out of myself just standing out there. I got what I needed to say in and left.
"I'm assuming it's a bad pitch because the way Casey reacted. Now, Casey did the right thing. He came back and was griping at him, but he didn't show him up.
"I was wrong and I shouldn't have gotten thrown out. It happens and probably the best thing, because under [hitting coach] Donnie [Mattingly] we won easily."
The Dodgers won, but it really wasn't that easy. After a three-run ninth, Hong-Chih Kuo earned his ninth save with a scoreless and hitless ninth inning.
"Unbelievable, just awesome," said Jansen describing his first win. "I can't stop smiling. I'm so happy."
The fourth of five pitchers, Jansen had a spotless eight inning.
Ely didn't factor in the decision, but pitched well, allowing six hits and three earned runs in six innings with four strikeouts and a walk.
"He got us through six innings," Torre said. "That was good."
Watching the game on television from the clubhouse, Torre was pleased with Ely's performance.
"He was violent at times, but smoothed it out," Torre said.
Jay Gibbons had two of the Dodgers' seven hits.