Ukraine has agreed to the framework of a mineral-rights deal with the U.S. Now comes the hard part: Getting anything out of the ground.

Even before the war—which has left up to 40% of Ukraine’s critical mineral deposits under Russian control—the lack of exploration activities for some minerals, infrastructure and even up-to-date maps of the deposits were major obstacles to large new commercial projects in Ukraine, executives and analysts say.

Corruption, red tape, a cumbersome legal system and a history of corporate raiding have long deterred foreign investment in Ukraine’s commodities sector.

Just ask Andrii Smolin.

His company, Avellana Gold, was targeted by a fake mining company, which he said used fabricated claims to try to seize Avellana’s gold mine in western Ukraine, resulting in a costly legal journey through Ukraine’s complex judicial system.

“In Ukraine, anyone can block your activity, with various means,” said Smolin, the head of Avellana’s Ukrainian office.

He said that judicial corruption, which analysts say is especially prevalent in the country’s lower courts, meant that the case was drawn-out and that Avellana incurred losses from not producing during that time. It ultimately won the case at the Ukrainian Supreme Court, which Smolin says remains a fair institution. Avellana proved it owned the license, but not before losing all its initial investors.

Kyiv didn’t respond to a request for comment.

The details of the mineral deal, which Trump and Zelensky are expected to sign in Washington this week, remain to be worked out. People familiar with the negotiations said Ukraine ultimately agreed to a deal for its natural resources after the U.S. dropped its demand for the right to $500 billion in revenues.

Ukraine is believed to have deposits of at least 20 of the 50 minerals that the U.S. considers critical. These include lithium, graphite, titanium, uranium and rare earths, a collection of 17 elements that are essential for everything from cellphones to the defense industry. Their collective potential value is estimated to be trillions of dollars, according to industry analysts.

Since the dissolution of the Soviet Union, economists say corruption has permeated Ukrainian society, creating a system where judges are often bribed and contractors have to promise kickbacks to win tenders.

Despite some progress in the past decade, Ukraine ranks 105th out of 180 countries in the Corruption Perception Index, an annual survey by the Berlin-based advocacy group Transparency International. The survey found that 23% of users of public services have paid a bribe in the past year. Russia ranks even lower, at 154th on the index. Russia has accused the advocacy group of interfering in its affairs.

International energy majors Shell and Chevron entered Ukraine more than a decade ago with high hopes of tapping into its shale-gas reserves. Their efforts were stymied by a combination of bureaucratic hurdles, local opposition, corruption and, ultimately, Russia’s initial invasion of Ukraine in 2014.

A woman holds a placard during a protest against a potential critical minerals deal between the U.S. and Ukraine outside the U.S. embassy, amid Russia’s attack on Ukraine, in Kyiv, Ukraine February 26, 2025. REUTERS/Thomas Peter

Chevron pulled out of its $10 billion shale-gas deal in 2014 due to delays in government approvals and regulatory challenges. Shell eventually exited its agreement with Ukraine in 2015, citing the conflict in the east of the country and an unfavorable business environment as contributing factors.

Even knowing precisely where and in what quantity Ukraine’s mineral resources are located is a challenge. Most of the maps and estimates available are based on outdated Soviet-era studies. To make new mines commercially viable, the owners must conduct a series of new investigations.

UkrLithiumMining is one such company.

Since receiving a production license from the Ukrainian government in 2017, the company, which is developing Ukraine’s first lithium mine, has spent more than $20 million acquiring the license and conducting studies to see exactly what is in the ground.

It also spent about $1 million paying a British company to conduct an environmental-impact report designed to facilitate investment.

And, before any mining can begin, a further investment of at least $350 million would be required to conduct a “definite visibility study” and build facilities for mining and processing the rock, of which lithium makes up only a small part.

“There’s an illusion that it’s someone taking a shovel and starting to dig money out of the ground,” said Denys Aloshyn, chief strategy officer for UkrLithiumMining.

Ukraine’s President Volodymyr Zelenskiy speaks during a press conference, amid Russia’s attack on Ukraine, in Kyiv, Ukraine February 26, 2025. REUTERS/Valentyn Ogirenko

Further, for any mining company in Ukraine today, the war is never too far away.

Titanium producer Velta, whose open-pit mine and two factories are located some 280 miles from the front line, has faced disruptions to its electricity supply due to Russian missile attacks on Ukrainian energy infrastructure. Last year, the company operated at only 50% of its plant’s capacity. Logistics costs, meanwhile, have more than tripled.

“The energy infrastructure suffered a lot from the war and that is a serious problem that Ukrainian producers face,” said Velta Chief Executive Andriy Brodskyy.

Despite the challenges, Velta has plans for future development, including discussions with investors in the U.S. about new projects.

Aloshyn said UkrLithiumMining also has plans but that it first needs to attract investment. The mine is in the Kirovohrad region, which is safely away from the front line. Still, Aloshyn acknowledged that the company was unlikely to attract the necessary funding to start digging while the war was going on.

A woman holds a placard during a protest against a potential critical minerals deal between the U.S. and Ukraine outside the U.S. embassy, amid Russia’s attack on Ukraine, in Kyiv, Ukraine February 26, 2025. REUTERS/Thomas Peter

“I don’t have many illusions that it’ll happen before the war is over, or before very strong security guarantees are in place,” he said. “Without very strong security guarantees in place, no rational corporate CEO would ever invest.”

Write to Georgi Kantchev at georgi.kantchev@wsj.com and Ian Lovett at ian.lovett@wsj.com