Introduction: In recent years, the study of the benefits that physical exercise has on brain health has acquired special relevance. In order to implement exercise as an intervention to protect the brain, it is important to have a more clear idea of its effect in the young population. However, few studies have been carried out on these ages. Objective: The main objective of our study was to evaluate the association between physical activity (PA) with memory and executive function, in university students, analyzing the modulatory effect of sex. Methodology: We collected socio-demographic and life habit information, as well as data on the PA that was carried out during the previous week using the international PA questionnaire short version (IPAQ-SF) questionnaire in 206 university students (mean age 19.55 ± 2.39; 67.5% women). Memory and executive function were assessed using a comprehensive battery of validate cognitive tests. Univariate and multivariate analyses were performed to correlate PA with cognitive tests scores and to evaluate the potential synergistic role of sex. Results: The main finding was that the total amount of PA correlated positively with several tests that evaluated aspects of executive function, specifically Stroop Colors (Pearson's r = 0.17; p = 0.01) and the Stroop Test Color-Word (Pearson's r = 0.15. p = 0.03). These results were adjusted by a large number of possible confounders and modifying variables in a multivariate analysis, like age, sex, academic record, day of the week, and time at which the test was performed. Additionally, we found out that sex had a synergistic effect with PA on the executive test Trail making test-A (TMTA), and in women, this association was stronger than in men. The more PA women reported, the better they performed, that is to say that they took less time to finalize the TMT-A (interaction term between PA and sex: b = −0.0009; p = 0.014). Conclusion: Our study adds evidence of the benefit of PA in cognition in the young population, specifically in the executive inhibitory control, and more significantly in women.