Along with the rapid growth of the size and complexity of Internet of Things (IoT), the security of terminal devices has increasingly become a focus. In order to ensure the security of terminals, the trusted network connect (TNC) could realize not only the user authentication but also the platform attestation during the network access process. However, the existing TNC infrastructure is based on a centralized architecture, which is not suitable for distributed services. To address this problem, we present a blockchain-based TNC protocol named BTNC to ensure the reliability of terminals in IoT. Due to the decentralization, trustlessness, trackability, and immutability features of blockchain, BTNC is able to verify the security of terminal devices in IoT networks. First, we come up with some threats, including unauthorized user, illegal platform and platform replacement attack, then correspondingly define the security goals of our scheme. Second, combining key exchange protocol based on blockchain and D–H PN protocol included in TNC specification, we propose a blockchain-based trusted network connection protocol, which realizes mutual user authentication, platform attestation and trust network access by cryptography among terminals in IoT. Third, we make a security analysis in the PCL mode and conclude that our protocol can resist the attacks above. Finally, the performance overheads caused by our scheme are evaluated and the experiments show that it is efficient and feasible for different kinds of terminals in IoT.