Ning, whose birthname is Chen Wanning, was arrested after police raided his apartment in Beijing's Chaoyang district for suspected drug-use.
There, police reportedly found the playwright using narcotics, along with a bag of methamphetamine and various drug paraphernalia.
The playwright confessed at the detention center that he had been using drugs since the end of 2013. Ning said that the drugs helped him combat his fatigue from writing.
Shortly after his release, Ning wrote on his Weibo account that he deeply regrets his drug use and promises to stay drug-free.
Ning first earned nation-wide fame when writing for the sitcom, "My Own Swordsman," which aired in 2007.
宁财神发道歉声明:我没有毒瘾 感谢重生
6·26国际禁毒日前夕,编剧宁财神(本名陈万宁)因吸毒被警方控制。昨日13点左右,宁财神微博发道歉信,称已经走出拘留所:“半年,1.5克冰 毒,给我的生活带来翻天覆地的剧变”,宁财神保证此生再也不会涉毒,并愿意接受大家的监督和检查。宁财神发布道歉信后,众多明星好友也纷纷力挺,姚晨、舒 淇、贾樟柯等都在微博支持他,并表示望能改过自新,写出更好的作品。