Dragon Age Origins is a better RPG *IF* you like cRPGs, which means DA:O is in my opinion also the better game. Quality wise they're mostly the same, DA2 has like 4 environments that are reused ALOT which is disgusting. DA2 is also more like Mass Effect 2 and 3 in the RPG mechanics it uses.
If you care about the story in DA and you intend to buy Dragon Age Inquisition, I'd play though both and import your DA:O save into DA2. I'd be surprised if they don't do some stuff with saves in DA:Inquisition aswell.