Nitrohydroxylated pyrrolidine and piperidine ring systems are conveniently obtained through a one-pot procedure involving sequential Michael-Henry reaction between nitroethylene and a nitrogen nucleophile incorporating a suitably placed precursor for the generation either reductively or oxidatively of an aldehyde group which is directly trapped in the subsequent nitroaldolization step.