Born in mainland China, Ni joined the Chinese Communist Party as a teenager but after angering a party official was forced to flee to Hong Kong where he became a staunch critic of the party. He began writing wuxia martial arts stories but became popular for his series of more than 100 science fiction novels based on the character "Wisely."
Ni wrote his first martial arts screenplay with the 1967 hit One-Armed Swordsman. He would go on to become a staple of Shaw Brothers Studios penning many of their most famous kung fu films including The 36th Chamber of Shaolin and The Five Deadly Venoms. Ni's best known works went uncredited though. He wrote the original screenplays for Bruce Lee's first two martial arts films, The Big Boss and Fist of Fury, though director Lo Wei is officially listed as the writer.