Abstract The objective of this paper is to analyse the relationship between corporate identity and loyalty in a public institution of higher education in an institutional crisis context. Moreover, the aim is to study the possible moderating effect that brand identification can have on this relationship. The information required to conduct the empirical analysis was obtained from an online survey. Data processing was carried out using the PLS‐SEM technique. The results obtained show that in an institutional crisis context, corporate identity influences university loyalty positively and significantly. However, it is detected that brand identification moderates the relationship between corporate identity and loyalty positively and significantly in an institutional crisis situation. In addition, we also observe that this moderating effect is greater in students than in graduates. It is considered a useful contribution, as it is one of the first studies in which the proposed relationships are analysed in an institutional crisis context. In addition, there is a concern about investigating the possible existence of the moderating role exerted by brand identification and if there are significant differences between students and graduates in this moderating effect. Significant practical implications arise from the results of this work, which can be particularly useful for managers of the type of organizations analysed.