Bangladeshi authorities said they intercepted a North Korean envoy who arrived at Dhaka’s international airport with 27 kilograms of gold—worth an estimated $1.4 million—in his carry-on bag.

Customs officials said they seized the gold and detained the diplomat, who they identified as Son Young Nam, a first secretary at the North Korean embassy in the Bangladeshi capital, on Thursday. Mr. Son was released Friday, they said.

Sales of gold have long been an important source of funds for the North Korean regime, which has been largely cut off from the global financial system by sanctions imposed to curb its nuclear-weapons program.

Kim Kwang-jin, a former banker for the Pyongyang regime, said North Korea could have been moving the precious metal in an effort to find buyers.

Bangladeshi police officials said they are also investigating whether Mr. Son was acting as a courier by a local smuggling ring. Bangladesh has become a transit point for illicit gold shipments bound for India, which has raised import duties on the metal.

Bangladeshi authorities said the North Korean diplomat had arrived from Singapore. “We tried to scan his bag, but he resisted,” said Kazi Zia Uddin, a senior customs official. “He gave in after he was told he would be arrested.”

Calls to the North Korean embassy in Dhaka went unanswered on Friday and Saturday, the weekend in Muslim majority Bangladesh.

A man who answered the phone at the North Korean embassy in Singapore and declined to give his name said he had “no idea” about the gold shipment and hadn’t heard of Mr. Son.

Bangladeshi airport officials said Mr. Son told them he had been given the bag with the gold by a man in Singapore whom he declined to identify. Mr. Son said he was to deliver it to “a friend” of the man in Dhaka, the officials said.

A police official said four North Korean diplomats came to the airport seeking Mr. Son’s release.

Gold smuggling through the Dhaka airport has risen sharply in recent months, with large quantities seized. In February, officials discovered 61 kilograms of gold in the toilet of a Bangladeshi aircraft.

Mr. Kim, the former Pyongyang banker, who defected while based in Singapore in 2003, said that North Korea may have moved the gold to Bangladesh for sale after running into problems selling it in Singapore.

North Korea has previously sold gold bullion in the Singapore market, he said. But tighter restrictions imposed by the city-state on sales of precious metals, stones and other valuable items last year have made it harder.

Singapore’s new rules, intended to combat money laundering and terrorism financing, require dealers to submit a report to the government for any cash transaction valued over about $14,000.

Gold sales help provide funds used by North Korean leaders to ensure the loyalty of senior officials by providing them with a comfortable lifestyle, according to high-level defectors.

Choi Kun-chol, a former senior North Korean official who worked at the state’s main gold-trading business, told the Journal last year that sales of gold from North Korean mines has fallen from a peak of around 10 tons in the late 1980s to around four tons in more recent years.

North Korea often uses diplomats to carry cash and other valuables, defectors and diplomats say. Increased sanctions and scrutiny of official bank accounts have increased the need for secret movement of items in this way, they say.