Help! I'm being attacked on sight in Dragonsreach!
From http://elderscrolls.wikia.com/wiki/Dragonsreach
Bugs:
- Possible random attacking of player after becoming "Thane"
- Solution: Commit another crime and pay off the bounty.
- Sometimes when the player enters Dragonsreach, all NPCs become hostile for no reason.
- Solution: Commit a crime and pay it off
Of course, as seems to be you can't do this. You have a recovery saved version? In addition, when you fight on the duel, did you kill or hit or damage someone?
Do you know what is your bounty in all cities? Because every city has a different bounty But, if you have a lot of bounty in another city, guards will attack you anyway.
On the PC you can fix it with the console, but not on the Xbox 360 or PS3.
You could try committing some other crime, such as blatantly stealing a near-worthless object. Your bounty will go up a bit, and perhaps the guards will approach you about it. Pay the price for the lesser crime, and maybe everything will sort itself out.