The acquisition, which is subject to customary closing conditions, is expected to be completed by the end of the year.
"The premium chocolate segment represents a strategic opportunity for Hershey based on increasing consumer demand for distinctive, high-end chocolate and for the antioxidant benefits of dark chocolate," said Hershey chief executive officer Richard Lenny in a statement.
The move comes as new studies are increasingly advocating the health benefits of cocoa flavonols, found in dark chocolate.
Flavonols could have a benefit on heart and brain health, claim the studies, though further research is required to determine the specific mechanisms for these actions.
Scharffen Berger claims to be one of the fastest growing premium dark chocolate companies in the US, known for the high-cocoa content of its chocolate and baking products.
The company's products are currently available online and in natural food stores, as well as in its three speciality stores in New York, Berkley and San Francisco.
Hershey, which has an annual turnover of $4bn and employs 13,000 people worldwide, plans to use its extensive distribution network to broaden consumer reach for the Scharffen Berger products.
"This is a tremendous opportunity for Scharffen Berger. With Hershey's resources we can accelerate our growth and leadership in the premium chocolate segment," said Scharffen Berger co-founder, John Scharffenberger.