U.S. Immigration and Customs Enforcement, or ICE, lodged an "immigration detainer" on 42-year-old Canadian national David DePape, DHS told CNBC in a statement.
The detainer requests that the San Francisco County Jail notify ICE before DePape is done serving time so that the immigration officers can take custody of him.
The Democratic House speaker was in Washington, D.C., at the time.
Paul Pelosi managed to call 9-1-1, and when officers arrived, DePape struck him in the head with the hammer, authorities said.
DePape arrived at the San Francisco home toting zip ties, tape, rope and at least one hammer, according to the affidavit.