Merck will pay $5.85 in cash for each share of Immune Design. Shares of Immune Design closed at $1.42 on Wednesday.
Immune Design's treatments help activate the immune system to produce or expand specific immune cells to fight cancer and other diseases.
Seattle, Washington-based Immune Design's pipeline includes late-stage immunotherapy technologies such as Glaas And Zvex.
Credit Suisse is the financial adviser to Merck, while Gibson, Dunn & Crutcher LLP its legal adviser.
Lazard is the financial adviser to Immune Design and Cooley LLP the legal counsel.
The transaction is expected to close early in the second quarter of 2019, the companies said.