The Basics of Garrity Rights
Garrity Rights protect public employees from being compelled to incriminate themselves during investigatory interviews conducted by their employers. This protection stems from the Fifth Amendment to the United States Constitution, which declares that the government cannot compel a person to be a witness against him/herself.
Garrity Rights originate from a 1967 United States Supreme Court decision, see Garrity v. New Jersey, 385 U.S. 493 (1967).
For a public employee, the employer is the government itself. When questioned by their employer, they are being questioned by the government. Therefore, the Fifth Amendment applies to that interrogation if it is related to potentially criminal conduct.
Garrity Rights stem not just from the Fifth Amendment, but also the Fourteenth Amendment. While the Fifth Amendment could be said to apply only to the federal government, the “equal protection” clause of the Fourteenth Amendment makes the Fifth Amendment applicable to state, county, and municipal governments as well, see Malloy v. Hogan, 378 U.S. 1 (1964).
Cited from http://www.garrityrights.org/basics.html.