Roglic, 29, successfully defended his sizeable lead over second-placed Alejandro Valverde in the 21st stage of the race, a 106.6km ride from Fuenlabada to the centre of Madrid which was won by Dutchman Fabio Jakobsen.
- Highlights of final Vuelta stage as Jakobsen wins in Madrid
- The Breakaway - Wiggins, Stephens and Smith reveal Vuelta highlights
"Winning this race is a great feeling and to be up here with another Slovenian makes it even better, it's great news for cycling in our country," Roglic said from the podium outside the Cibeles palace in Madrid.
I haven't had time to think about all of this, but all I know is that me and the team rode together to make history.
Roglic has only been a professional cyclist since 2012, making the leap into the sport after an impressive junior career in ski jumping, winning the junior world championships in 2007.
He was among the favourites to win a Vuelta lacking in household names and showed remarkable consistency throughout the race, despite a rocky start which saw him and his Jumbo-Visma team mates involved in a mass crash on the opening stage.
Highlights of final Vuelta stage as Jakobsen wins in Madrid
The Slovenian lost 40 seconds to early leader Miguel Angel Lopez as a result of that crash but came flying back into contention on stage 10 with a superb victory on the individual time trial to take the red jersey from Nairo Quintana.
His time trial exploits gave him a commanding lead of three minutes and although Quintana and Valverde traded places as Roglic's closest challenger, the Slovenian rarely looked like surrendering his advantage.
He did suffer a scare when he crashed on stage 19 and Valverde's Movistar team attacked to the outrage of many in the peloton as cycling etiquette dictates that no attacks are allowed if a race leader crashes or has a mechanical.
Valverde eventually caved in to the protests and Roglic was allowed to catch up with the peloton, and he virtually sealed the overall victory by surviving Saturday's gruelling mountain stage to Plataforma de Gredos.