Either pre- or post-natal environmental factors seem to play a key role in brain and behavioral development and to exert long-term effects. Increasing evidence suggests that exposure to prenatal stress (PS) leads to motor and learning deficits and elevated anxiety, while enriched environment (EE) shows protective effects. The dopaminergic system is also sensitive to environmental life circumstances and affects attention functioning, which serves as the preliminary gate to cognitive processes. However, the effects of methylphenidate (MPH) on the dopaminergic system and attentional functioning, in the context of these life experiences, remain unclear. Therefore, we aimed to examine the effects of EE or PS on distinct types of attention, along with possible effects of MPH exposure. We found that PS impaired selective attention as well as partial sustained attention, while EE had beneficial effects. Both EE and MPH ameliorated the deleterious effects of PS on attention functioning. Considering the possible psychostimulant effect of MPH, we examined both anxiety-like behavior as well as motor learning. We found that PS had a clear anxiogenic effect, whereas EE had an anxiolytic effect. Nevertheless, the treatment with both MPH and/or EE recovered the deleterious effects of PS. In the motor-learning task, the PS group showed superior performance while MPH led to impaired motor learning. Performance decrements were prevented in both the PS + MPH and EE + MPH groups. This study provides evidence that peripubertal exposure to EE (by providing enhanced sensory, motor, and social opportunities) or MPH treatments might be an optional therapeutic intervention in preventing the PS long-term adverse consequences.