President Trump was repeatedly warned by his own staff that the Ukraine conspiracy theory that he and his lawyer were pursuing was “completely debunked” long before the president pressed Ukraine this summer to investigate his Democratic rivals, a former top adviser said on Sunday.

Thomas P. Bossert, who served as Mr. Trump’s first homeland security adviser, said he told the president there was no basis to the theory that Ukraine, not Russia, intervened in the 2016 election and did so on behalf of the Democrats. Speaking out for the first time, Mr. Bossert said he was “deeply disturbed” that Mr. Trump nonetheless tried to get Ukraine’s president to produce damaging information about Democrats.

Mr. Bossert’s comments, on the ABC program “This Week” and in a subsequent telephone interview, underscored the danger to the president as the House moves ahead with an inquiry into whether he abused his power for political gain. Other former aides to Mr. Trump said on Sunday that he refused to accept reassurances about Ukraine no matter how many times it was explained to him, instead subscribing to an unsubstantiated narrative that has now brought him to the brink of impeachment.