We propose a framework to identify and estimate earnings distributions and worker composition on matched panel data, allowing for two‐sided worker‐firm unobserved heterogeneity and complementarities in earnings. We introduce two models: a static model that allows for nonlinear interactions between workers and firms, and a dynamic model that allows, in addition, for Markovian earnings dynamics and endogenous mobility. We show that this framework nests a number of structural models of wages and worker mobility. We establish identification in short panels, and develop tractable two‐step estimators where firms are classified in a first step. Applying our method to Swedish administrative data, we find that log‐earnings are approximately additive in worker and firm heterogeneity. Our estimates imply the presence of strong sorting patterns between workers and firms, and a small contribution of firms—net of worker composition—to earnings dispersion. In addition, we document that wages have a direct effect on mobility, and that, beyond their dependence on the current firm, earnings after a job move also depend on the previous employer.