Harper batted third and played right field Monday night in the opener of a three-game series at San Francisco.
Manager Davey Johnson said right fielder Jayson Werth is still a couple of weeks from coming off the disabled list after another MRI on his strained right hamstring showed he isn't healing as quickly as hoped.
"He's going to rest a bit," Johnson said. "The MRI showed he has some problems in there."
Harper, last season's NL Rookie of the Year, was hurt last week when he ran into a wall at Dodger Stadium.
"Just trying to get in that lineup again and do what I can do," Harper said before batting practice at AT&T Park. "It's something you don't like doing, running into a wall at 100 mph. I'm going to feel something this day and feel something that day. I'm just trying to keep up on my knee and see what happens."
Harper did some running and work on the field before the game against the Giants. Johnson said Harper told him he was fine to play.
"I asked him, and he said yes," Johnson said. "He's still got some swelling in there but he did a lot of treatment. He was a little bit better yesterday afternoon and acting like he wanted to go up there and hit something."
Entering Monday, Harper was batting .297 with 11 home runs and 22 RBIs for the Nationals, second in the NL East behind Atlanta.
The 20-year-old Harper ran face-first into the wall last Monday in a scary collision against the Dodgers and needed 11 stitches in his chin. He was trying to chase down a long fly by A.J. Ellis.
The impact sent Harper's cap flying as he bounced off the wall and fell to the ground. Center fielder Denard Span had to come in to field the ball. Harper rolled onto his back and eventually got up under his own power.
Whether his body allows him to play every day this week, Harper said he wouldn't know until he tested his sore body through a full game.
"We'll see how I feel after the game tonight and go from there," he said.