The high spectrum efficiency of non-orthogonal multiple access (NOMA) is attractive to solve the massive number of connections in the Internet of Things (IoT). This paper investigates a buffer-aided cooperative NOMA (C-NOMA) system in the IoT, where the intended users are equipped with buffers for cooperation. The direct transmission from the access point to the users and the buffer-aided cooperative transmission between the intended users are coordinated. In particular, a novel buffer-aided C-NOMA scheme is proposed to adaptively select a direct or cooperative transmission mode, based on the instantaneous channel state information and the buffer state. Then, the performance of the proposed scheme, in terms of the system outage probability and average delay, is theoretically derived with closed-form expressions. Furthermore, the full diversity order of three is demonstrated to be achieved for each user pair if the buffer size is not less than three, which is larger than conventional non-buffer-aided C-NOMA schemes whose diversity order is only two in the considered C-NOMA system in the IoT.