The risk of venous thromboembolism (VTE) in ambulatory COVID-19 is controversial. In addition, the association of vaccination with COVID-19-related VTE and relevant clinical and genetic risk factors remain to be elucidated. To quantify the association between ambulatory COVID-19 and short-term risk of VTE, study the potential protective role of vaccination, and investigate clinical and genetic risk factors for post-COVID-19 VTE. This population-based cohort study of patients with COVID-19 from UK Biobank included participants with SARS-CoV-2 infection that was confirmed by a positive polymerase chain test reaction result between March 1, 2020, and September 3, 2021, who were then propensity score matched to COVID-19-naive people during the same period. Participants with a history of VTE who used antithrombotic drugs (1 year before index dates) or tested positive in hospital were excluded. First infection with SARS-CoV-2, age, sex, ethnicity, socioeconomic status, obesity, vaccination status, and inherited thrombophilia. The primary outcome was a composite VTE, including deep vein thrombosis or pulmonary embolism, which occurred 30 days after the infection. Hazard ratios (HRs) with 95% CIs were calculated using cause-specific Cox models. In 18 818 outpatients with COVID-19 (10 580 women [56.2%]; mean [SD] age, 64.3 [8.0] years) and 93 179 matched uninfected participants (52 177 women [56.0%]; mean [SD] age, 64.3 [7.9] years), the infection was associated with an increased risk of VTE in 30 days (incidence rate of 50.99 and 2.37 per 1000 person-years for infected and uninfected people, respectively; HR, 21.42; 95% CI, 12.63-36.31). However, risk was substantially attenuated among the fully vaccinated (HR, 5.95; 95% CI, 1.82-19.5; interaction P = .02). In patients with COVID-19, older age, male sex, and obesity were independently associated with higher risk, with adjusted HRs of 1.87 (95% CI, 1.50-2.33) per 10 years, 1.69 (95% CI, 1.30-2.19), and 1.83 (95% CI, 1.28-2.61), respectively. Further, inherited thrombophilia was associated with an HR of 2.05 (95% CI, 1.15-3.66) for post-COVID-19 VTE. In this population-based cohort study of patients with COVID-19, ambulatory COVID-19 was associated with a substantially increased risk of incident VTE, but this risk was greatly reduced in fully vaccinated people with breakthrough infection. Older age, male sex, and obesity were clinical risk factors for post-COVID-19 VTE; factor V Leiden thrombophilia was additionally associated with double the risk, comparable with the risk of 10-year aging. These findings may reinforce the need for vaccination, inform VTE risk stratification, and call for targeted VTE prophylaxis strategies for unvaccinated outpatients with COVID-19.