They also raided the country’s national pension fund as the inquiry into President Park Geun-hye and her friend Choi Soon-sil continued, while two ministers offered to resign.
South Korea’s presidential office said the justice minister and senior presidential secretary for civil affairs had offered to step down. The president has not accepted their offers.
Ms Park’s office was also forced to defend the purchase of hundreds of erectile dysfunction pills.
Officials at Samsung Group and National Pension Service (NPS) confirmed investigators visited their offices in Seoul.
The Investment Management Office of the world’s third-largest pension fund was the target of the raid, according to an NPS official.
Samsung spokeswoman Lim Bomi declined to say which Samsung department was raided.
The raids took place as the political fallout from the scandal continued to grow after prosecutors charged Ms Choi and two of Ms Park’s most senior aides.
Ms Park has been refusing to meet prosecutors who said she conspired in criminal activities with the confidante and that she needs to be questioned.
While she faces mounting calls to resign, public anger has also been simmering toward Samsung because of its alleged links with Ms Choi.
It is not the first time Samsung has been raided by prosecutors investigating the scandal, and South Korean reports say the simultaneous raids of the company and the pension fund showed that the investigation was expanding to a contentious Samsung merger.
South Korea’s Yonhap news agency reported earlier that prosecutors were looking into whether the presidential office played a role in the pension service’s vote to support the controversial merger of two Samsung companies last year.
Samsung narrowly won shareholders’ approval to merge Samsung C&T and Cheil Industries in July 2015.
Most investors and analysts questioned Samsung’s argument that the deal was to create synergies between a Samsung construction firm and another Samsung firm that ran an amusement park and fashion businesses.
The merger deal was crucial for Samsung heir Lee Jae-yong, who held a small stake in Samsung Electronics. It helped Mr Lee – a grandson of the Samsung founder and a vice chairman at Samsung Electronics – strengthen his grip on the group’s crown jewel, Samsung Electronics, without spending his own money.
Shareholders who opposed the merger, including US hedge fund Elliott, said the deal unfairly benefited Samsung’s founding families while hurting minority shareholders.
In the end it was NPS, a major shareholder at both Samsung C&T and Cheil Industries, which played the role of kingmaker in the shareholder vote. The pension fund cast a vote in support of the merger even as some outside advisers recommended it oppose the deal.
Meanwhile, Ms Park’s office on Wednesday confirmed revelations by an opposition politician that it purchased about 360 Viagra pills and the generic version of the drug in December.