Stock markets in the U.S. will go "haywire" if President Donald Trump fails to win a second term in the White House, prominent investor Mark Mobius predicted on Thursday.

Mobius, co-founder of Mobius Capital Partners, said U.S. markets have continued to climb higher partly because of Trump's policies. The president made several moves that many considered pro-business since he took office in 2017, such as slashing corporate tax rates.

The S&P 500 and the Dow Jones Industrial Average have gone up by more than 30% since the beginning of 2017, while the Nasdaq Composite has risen by around 45%. Such optimism in the stock markets could be disrupted if Trump loses in next year's presidential race, the investor said.

"I think the markets then will go haywire because they've been depending on Trump policies to keep on pushing the market up and also higher growth rate in the U.S.," Mobius told CNBC's "Street Signs."

He added that for now, "it doesn't look likely" that Trump will lose. However, sentiment in the media appeared to be "overwhelmingly" against the president — and that could continue to build until the election next year, he explained.

"That's why I'm a little concerned about this," he said.