Pietersen is yet to hit form with his new employers and edged to Owais Shah off Scott Styris shortly after lunch for his second duck in three championship opportunities.
The departure of the South African-born England batsman meant Hampshire were in trouble on 92 for four.
However, patient batting from John Crawley and Michael Brown ensured the home side bounced back to post 275 before they were bowled out.
Crawley made 84 while Brown hit 51.
By the close, Ben Hutton and Andrew Strauss had made nine for no loss for Middlesex in reply.