We report on a theoretical discovery of a generic piezoelectric field in strained core-shell compound semiconductor nanowires. We show, using both an analytical model and numerical simulations based on fully electroelastically coupled continuum elasticity theory, that lattice-mismatch-induced strain in an epitaxial core-shell nanowire gives rise to an internal electric field along the axis of the nanowire. This piezoelectric field results predominantly from atomic layer displacements along the nanowire axis within both the core and shell materials and can appear in both zinc blende and wurtzite crystalline core-shell nanowires. The effect can be employed to separate photon-generated electron-hole pairs in the core-shell nanowires and thus offers a new device concept for solar energy conversion.