Hanson shot a 66 on the New Course at Walton Heath in the morning, then carded a 68 on the Old Course in the afternoon. Lomas scored a 68 in the morning and a 66 later in the day.
The two will be joined by Simon Dyson, Soren Kjeldsen, Michael Campbell, Peter Hedblom, Robert Karlsson, Nick Dougherty and Jose-Filipe Lima at Pinehurst, N.C.
Dyson finished in third place at 7 under and Kjeldsen was fourth at 6 under after two rounds of 69.
The alternates are Martin Maritz, Marcus Fraser, Peter Fowler and Steve Webster. More than 50 players competed for the nine spots.
Hanson reaped the benefits of practice rounds on both courses last week.
'I took last week off and played the courses Saturday and Sunday,' said Hanson, who scored his first European tour victory in the Spanish Open in April.
The Swede eagled the 570-yard 13th with a 3-iron to 9 feet and birdied the last two holes in the morning.
'I've never played competitively in America and I decided to come early and give it my very best shot and I'm glad I did,' Hanson said.
Lomas also will be playing in his first U.S. Open.
'I think the course will suit me, with narrow, hard fairways,' he said.
Hedblom, who shot a 65 on the second 18 for the day's best round, had a spectacular finish. After 14 holes of his second round, he was at 2 under. Then he holed a 7-iron from 160 yards at the 413-yard 15th for an eagle and birdied the last three.