 After Zhu founded the Ming dynasty and became the Hongwu Emperor, he doubted his subjects' loyalties towards him and was constantly on guard against possible rebellions and assassinations.One of the early duties of the Jinyiwei was to help the emperor spy on his subjects.The Hongwu Emperor increased the Jinyiwei's duties later, allowing them to inspect his officials at work in the capital city, before formally establishing the organisation in 1382, with about 500 members.