1. A friend of mine asked me this question, so I researched it; the answer, turns out, is yes: A person may refuse to testify, even when subpoenaed, on the grounds that the testimony may expose him to criminal liability. But if the prospect of criminal liability disappears — whether because he has been granted adequate immunity by prosecutors, or because he has accepted a presidential pardon — then the privilege against self-incrimination also disappears. “[I]f the witness has already received a pardon, he cannot longer set up his privilege, since he stands with respect to such offence as if it had never been committed.” Brown v. Walker (1895); see also, e.g., Nixon v. Sampson (D.D.C. 1975) (yes, that Nixon). (Remember that, as with President Richard Nixon, a pardon can preclude future criminal prosecutions, and not just erase past ones.)
2. Of course, that only works to the extent that the pardon does indeed foreclose the possibility that your testimony will be used against you in a criminal prosecution. A presidential pardon, for instance, only applies to federal crimes; if the conduct could also be prosecuted as a state crime, the witness can refuse to testify about it. The same is true if a governor pardons someone for committing a state crime, but there remains a risk that the person could be prosecuted by the federal government for the same conduct.
3. Here’s a twist, though: A person can refuse a pardon, precisely to maintain his privilege against self-incrimination. Indeed, in Burdick v. U.S. (1915), a newspaper editor who was using the privilege to avoid testifying about the sources for a story — on the theory that his testimony would incriminate him personally, and not just the source — refused a pardon from President Woodrow Wilson and thus retained his right not to testify. In the words of the court,
[T]he grace of a pardon, though good its intention, may be only in pretense or seeming; in pretense, as having purpose not moving from the individual to whom it is offered; in seeming, as involving consequences of even greater disgrace than those from which it purports to relieve. Circumstances may be made to bring innocence under the penalties of the law. If so brought, escape by confession of guilt implied in the acceptance of a pardon may be rejected, — preferring to be the victim of the law rather than its acknowledged transgressor, — preferring death even to such certain infamy. This, at least theoretically, is a right, and a right is often best tested in its extreme.
4. The witness cannot, however, preserve his privilege by refusing a statutory grant of immunity; once that immunity is granted, he must testify, or face punishment for contempt of court if he doesn’t testify. Here’s the Supreme Court’s explanation for why a pardon can be refused but immunity cannot be:
This brings us to the differences between legislative immunity and a pardon. They are substantial. The latter carries an imputation of guilt; acceptance a confession of it. The former has no such imputation or confession. It is tantamount to the silence of the witness. It is noncommittal. It is the unobtrusive act of the law given protection against a sinister use of his testimony, not like a pardon, requiring him to confess his guilt in order to avoid a conviction of it.