Abstract We present an improved approach to generating moist baroclinically unstable background states for f-plane-channel simulations via potential vorticity (PV) inversion. Previous studies specified PV distributions with constant values in the troposphere and the stratosphere, but this produces unrealistic static-stability profiles that decrease sharply with height in the troposphere. Adding moisture to such environments can yield unrealistically large values of convective available potential energy (CAPE) even for reasonable relative humidity (RH) distributions. In our modified approach, we specify a PV distribution that increases with height in the troposphere and the stratosphere, yielding background states with more realistic values of static stability and CAPE. This modification produces environments that are better suited for representing moist processes, namely, deep convection, in idealized extratropical-cyclone simulations. Also, we present a method for introducing moisture that preserves a specified RH distribution while maintaining hydrostatic balance. Our approach allows for a large degree of control over the initial conditions, as background states with different jet strengths and shapes, average temperatures, moisture contents, or horizontal shears can easily be obtained without changing the underlying PV formula and inadvertently producing unreasonable values of static stability or CAPE. We demonstrate the characteristics of idealized extratropical cyclones developing in our background states by adding localized perturbations that represent an upper-level trough passing over a low-level frontal zone. In particular, we illustrate the impacts of horizontal shear, moisture, and grid spacing on baroclinic-wave development.