Martinez, 33, told the Pirates to place his name on the voluntarily retired list.
The team filled the roster spot by recalling Warren Morris, its starting second baseman in 1999 and 2000, from triple-A Nashville.
Martinez, the brother of Boston Red Sox pitcher Pedro Martinez, lasted 2 2/3 innings against the San Francisco Giants in an 11-6 loss Tuesday, allowing four runs and three hits, including homers by Jeff Kent and Marvin Benard.
According to some Pirates players, Martinez went to the clubhouse and packed his bag after being removed.
"Ramon is a class act," manager Lloyd McClendon said. "I think it was a real tough decision for him.
"As he explained it to me, he was used to performing at a real high level. It was real tough for him to go out and compete under those circumstances.
"He felt like he was letting his team down and didn't want to continue."
The Pirates signed Martinez as a free agent on April 11.
Five teams were interested in Martinez but the Pirates, whose rotation was depleted by injuries, offered an immediate chance to start.
"I thought he was going to be OK," McClendon said. "Until the time he retired, I still had those thoughts, that the potential was there.
"It's unfortunate but it's certainly his decision to make."
Martinez was 0-2 with an 8.62 ERA in four starts and struggled with his command, walking 16 in 15 2/3 innings.
His control problems caused him to fall behind in the count and that let hitters tee off on a fastball that was no longer overpowering because of rotator cuff surgery in 1998.
Pirates catcher Jason Kendall hit against Martinez when he was one of the best pitchers in the game.
"He could throw 97 miles an hour and put the ball on the outside black of the plate," Kendall said. "He was nasty."
Martinez, 135-88 in his career, was 20-6 for the Dodgers in 1990 and had two 17-win seasons before injuring is arm.
He pitched a no-hitter against Florida in 1995.
After the injury and rehab work, he signed with the Boston Red Sox, where his younger brother was the staff ace, and was 10-8 with a 6.13 ERA last season.
The Red Sox didn't pick up his contract option, and Martinez was released by the Dodgers late in spring training after choosing Eric Gagne over him to be their No. 5 starter.
Morris lost his starting job this spring as Pat Meares was shifted to second to make room for rookie shortstop Jack Wilson.
Morris was batting .301 with a homer and 15 RBIs in 25 games at Nashville.
He was 15-for-29 the last six games.
