Mr. Trump last year disparaged Mr. McCain’s status as a war hero because the Republican senator from Arizona was captured, and more recently he insinuated that Ghazala Khan — the mother of a fallen Muslim soldier who appeared with her husband, Khizr, at the Democratic convention — did not speak because she was not permitted to by her religion.

Mr. McMullin is said to be backed by the group Better for America, which earlier this year began an effort to get on the ballot in as many states as possible, with the hopes of drafting a candidate. The group is backed by John Kingston, a donor who had supported Mitt Romney. Mr. Kingston has worked with the pollster Joel Searby. Rick Wilson, a Republican consultant and Trump foe, is the main strategist on the effort.

Polling shows that Mr. Trump’s support in Utah is very low for a Republican presidential candidate, and it has particularly suffered amid his battles against Mr. Romney, a Mormon who was the Republican nominee in 2012.

If Mr. McMullin is competitive nowhere else but Utah, he still could nonetheless have an effect on the race: Mr. Trump cannot win the presidency without holding the states that Mr. Romney won, his aides have concluded.