Millwall youngster Fred Onyedinma had the first chance of the game but the winger sent his half-volley wide of the goal despite having the time to pick his spot.
However, the away side pulled in front midway through the first half through O'Brien, with the forward nodding home Shaun Cummings's cross-field ball despite having his back towards goal.
In the second half, Neil Collins had the chance to equalise but the midfielder put his header high over Jordan Archer's goal before Onyedinma saw his goal-bound strike saved in the top corner by United goalkeeper Mark Howard.
The lead lasted 10 minutes as O'Brien scored his second to give Millwall the victory. The 22-year-old met a Shane Ferguson cross to slide the ball home from a yard out to give the Republic of Ireland youth international his seventh goal of the season.
Millwall rise to eighth in the League One table with their fourth away win of the season, while Sheffield United remain in fifth with the rest of the division playing later today.