Do legal institutions affect norms of cooperation? Using the introduction of the Code Napoleon during the Napoleonic Wars in Germany as a historical experiment, I show that a positive shock to the quality of legal institutions can increase social-capital long-lastingly. I find that individuals living in regions where the Code Napoleon was used display higher levels of interpersonal trust in the data of the German Socio-Economic Panel (SOEP). This result holds true conditional on past development levels, as well as in a less heterogeneous border sample, separating regions that applied the Code Napoleon from those that did not. Artificially moving the border and comparing regional pre-treatment characteristics support the interpretation of a causal treatment effect. In addition, I show immediate effects of the Code Civil on novel measures of 19th century social capital. The analysis of historical employment data furthermore suggests economic cooperation to be a potential mechanism for the relationship between legal institutions and social capital.