PurposeThe effect of the duration of an educational rotation presented at a palliative care unit on the palliative care knowledge gain and the increase of palliative care self-efficacy expectations are unclear.MethodsThis national prospective multicenter pre–post survey conducted at twelve German University Comprehensive Cancer Centers prospectively enrolled physicians who were assigned to training rotations in specialized palliative care units for three, six, or twelve months. Palliative care knowledge [in %] and palliative care self-efficacy expectations [max. 57 points] were evaluated before and after the rotation with a validated questionnaire.ResultsFrom March 2018 to October 2020, questionnaires of 43 physicians were analyzed. Physicians participated in a 3- (n= 3), 6- (n= 21), or 12-month (n= 19) palliative care rotation after a median of 8 (0–19) professional years. The training background of rotating physicians covered a diverse spectrum of specialties; most frequently represented were medical oncology (n= 15), and anesthesiology (n= 11). After the rotation, median palliative care knowledge increased from 81.1% to 86.5% (p< .001), and median palliative care self-efficacy expectations scores increased from 38 to 50 points (p< .001). The effect of the 12-month rotation was not significantly greater than that of the 6-month rotation.ConclusionAn educational rotation presented in a specialized palliative care unit for at least six months significantly improves palliative care knowledge and palliative care self-efficacy expectations of physicians from various medical backgrounds.Supplementary InformationThe online version contains supplementary material available at 10.1007/s00432-022-04131-w.