Shortly thereafter, Ms. Yang was intercepted by the Burmese authorities while traveling by car from the Thai border with her deputy, Lo Hsing Han. She spent five years in prison in Mandalay, on charges that she helped Chinese Nationalist soldiers illegally cross the border into Burma. It was the first of many imprisonments for Ms. Yang and Mr. Lo.

Mr. Lo would go on to earn the designation “kingpin of the heroin traffic in Southeast Asia,” by United States drug enforcement officials, after striking a deal with the Burmese military government that allowed him to resume trading in opium in return for assisting government forces against rebel forces.

After her older brother Edward abdicated in 1959, along with dozens of other hereditary rulers in Shan state, Ms. Yang took control of his former army, becoming the de facto ruler of the territory. She also, according to her relatives, entered into a relationship with a Burmese movie actress, Wah Wah Win Shwe, lavishing her with gifts and adding her name to the deed of her house in Yangon.

Ms. Yang’s family considered them a couple, though in an interview in 2015, Ms. Win Shwe, who still lived in a house on Ms. Yang’s former property, denied an affair. In any case, the arrangement came to an abrupt end in 1963, when Ms. Yang was arrested by police officials under Gen. Ne Win, who had seized power in Burma the year before. She spent six years in Yangon’s Insein Prison, where she reportedly endured torture.

Her career took another turn in 1989, when she was in her 60s. Retired as a warlord but respected among the ethnic rebel groups, Ms. Yang was recruited by the Burmese government’s chief of intelligence, Khin Nyunt, along with her former colleague Mr. Lo, to help negotiate peace agreements for the government. The agreement struck with Ms. Yang’s distant relative Peng Jiasheng and his Kokang rebel force, the Myanmar National Democratic Alliance Army, largely held until new fighting broke out in 2009.

Confined to a wheelchair, Ms. Yang spent her twilight years in relative obscurity, living in the care of her stepson and his militiamen in a compound in Muse. Visited there not long after she had a stroke in 2015, Ms. Yang said she was happy to be living surrounded by deferential soldiers. When shown a photograph of Ms. Win Shwe at her home, Ms. Yang responded with a knowing smile and a devilish laugh. With a Chinese cigarette in her hand, she said, “That whole property was mine.”

Ms. Yang, who died on July 13, is survived by two younger sisters and her son. None of her immediate relatives remain in Kokang. Ms. Yang’s eventual tomb, built for her with the help of one of her former soldiers, stands near Muse, just outside Kokang.

“It’s very sad for all of Kokang,” said the former soldier, Liu Guoxi, reached by phone as he was preparing for the funeral. “We have all come to say farewell to our leader.”