China’s economic growth is transforming from being traditional and factor-driven to being innovation-driven. How to improve the independent innovation ability and build the sustainable competitiveness of enterprises through knowledge transfer in industry–university–research-institute (IUR) cooperation has become an urgent problem to be solved. The obstacles to knowledge transfer in an IUR cooperation include internal and external cooperation risk factors. Improving the governance mechanism of an IUR cooperation, reducing cooperation risks, and promoting knowledge transfer are effective means for overcoming such obstacles in the short term. Interorganizational governance mechanisms include contractual governance and relationship governance. Obvious differences exist in the target functions of the different types of governance mechanisms, and their effects on knowledge transfer also differ. Based on a questionnaire survey on the IUR cooperation innovation of 364 enterprises, this study discusses the impact of the contractual governance mechanism and relationship governance mechanism on knowledge transfer in the IUR cooperation. Different types of contractual governance mechanisms have different effects on knowledge transfer. The contractual coordination mechanism significantly promotes explicit knowledge transfer in an IUR cooperation but has no significant impact on tacit knowledge transfer, whereas the contractual control mechanism significantly promotes explicit knowledge transfer but hinders tacit knowledge transfer. Meanwhile, the relationship governance mechanism has a significant positive impact on explicit knowledge transfer and tacit knowledge transfer. The joint use of the contractual coordination mechanism and relationship governance mechanism can significantly promote explicit knowledge transfer and tacit knowledge transfer, whereas the joint use of the contractual control mechanism and relationship governance mechanism can significantly weaken the two types of knowledge transfer. This study provides not only a theoretical explanation for the dispute over the “complementarity” or “substitution” relationship between the contractual governance mechanism and relationship governance mechanism in knowledge transfer in an IUR cooperation, thereby enriching relationship governance theory and knowledge management theory, but also a reference to the government, enterprises, and universities/scientific institutions participating in an IUR cooperation.