The way Joseph E. Joseph tells it, he was just doing his civic duty.

On his way home from work one evening in 1992, he came across a group of volunteers in Brooklyn registering people to vote. Mr. Joseph, a legal permanent resident who had immigrated from St. Kitts eight years earlier, decided it was time to sign up. He cast a ballot in that year’s presidential election, he said, and in every one since.

His participation in American democracy came at a steep cost: The government is now trying to deport him.

In the United States, only citizens are allowed to vote in national and statewide elections. And while immigrants who are granted permanent residency  a green card  enjoy an array of privileges, including the right to work, they can lose them all and be expelled from the country if the authorities discover that they have even registered to vote.

Uncovering an immigrant’s voting history is not always hard. Many proudly acknowledge having voted when applying for American citizenship.