Context: Intraprofessional collaboration (intraPC) between primary care (PC) doctors and medical specialists (MSs) is becoming increasingly important. Patient safety issues are often related to intraPC. In order to equip doctors well for their task of providing good quality and continuity of care, intraPC needs explicit attention, starting in postgraduate training. Worldwide, PC residents undertake a hospital placement during their postgraduate training, where they work in proximity with MS residents. This placement offers the opportunity to learn intraPC. It is yet unknown whether and how residents learn intraPC and what barriers to and opportunities for exist in learning intraPC during hospital placements. Methods: We performed an ethnographic non-participatory observational study in three emergency departments and three geriatric departments of five hospitals in the Netherlands. This was followed by 42 in-depth interviews with the observed residents and supervisors. The observations were used to feed the questions for the in-depth interviews. We analysed the interviews iteratively following the data collection using template analysis. Results: Hospital wards are rich in opportunities for learning intraPC. These opportunities, however, are seldom exploited for various reasons: intraPC receives limited attention when formulating placement goals, so purposeful learning of intraPC hardly takes place; residents lack awareness of the learning of intraPC; MS residents are not accustomed to searching for expertise from PC residents; PC residents adapt to the MS role and they contribute very little of their PC knowledge, and power dynamics in the hospital department negatively influence the learning of intraPC. Therefore, improvements in mindset, professional identity and power dynamics are crucial to facilitate and promote intraPC. Conclusions: Intraprofessional collaboration is not learned spontaneously during hospital placements. To benefit from the abundant opportunities to learn intraPC, adjustments to the setup of these placements are necessary. Learning intraPC is promoted when there is a collaborative culture, hierarchy is limited, and there is dedicated time for intraPC and support from the supervisor. This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.