The attack happened just before 1 p.m. as two guards took 48-year-old David Gomez out of a disciplinary isolation cell for an interview at Salinas Valley State Prison in Soledad, southeast of Monterey, Salinas Valley State Prison Lt. Darren Chamberlain said.
The guard was taken to a hospital with non-life-threatening injuries, but his current condition is unknown, Chamberlain said.
Gomez, who has a history of mental illness, was transferred from Sacramento to Monterey County for pretrial proceedings in the 2004 murder of his cellmate at Salinas Valley State Prison.
Gomez is serving a life sentence in a 1998 Los Angeles County case for rape, oral copulation on a minor under age 14 and burglary.
Chamberlain said the proceedings concern Gomez's attempts to fire his defense attorney.