Wisconsin Gov. Scott Walker told a private dinner of New Hampshire Republicans this month that he backed the idea of allowing undocumented immigrants to stay in the country and to eventually become eligible for citizenship, a position at odds with his previous public statements on the matter.

Mr. Walker’s remarks, which were confirmed by three people present, vary from the call he has made for “no amnesty”—a phrase widely employed by people who believe immigrants who broke the law by entering the country without permission...