Abstract Although prior research suggests that political affinity between home and host countries can influence the strategic decisions and outcomes of multinational corporations by conferring legitimacy, it often implicitly assumes that this legitimacy transfer occurs automatically. This assumption overlooks the complexity of organizational legitimation. We address this gap by exploring the specific pathways through which political affinity translates into the legitimacy of foreign initial public offering (IPO) firms, a context where overcoming the capital market liability of foreignness is critical. Drawing on the legitimacy perspective, we develop a model that explains how and when political affinity influences the legitimacy and survival of foreign IPO firms in the host‐country stock market. Specifically, we theorize and test a moderated mediation model that demonstrates: (1) the legitimation mechanism ( how ): political affinity enhances the legitimacy of foreign IPO firms through endorsements by local analysts and alliance partners, thereby reducing their delisting risk and (2) the boundary condition ( when ): this pathway is more pronounced for firms with stronger external stakeholder orientation. Empirical analyses using a sample of foreign IPO firms in the United States provide general support for our theoretical predictions. We discuss the implications of these findings for research on political affinity and foreign IPO firms.