Dirks and Ueda married in 2007. She initially also worked at D. E. Shaw Research, but stopped in 2010 to raise the first of two children. The couple settled in the Westchester County suburb of Chappaqua, New York. He rose early to commute to his job via Metro-North Railroad's Harlem Line, and returned late but devoted as much time as possible on evenings and weekends to his children.
On February 3, 2015, Dirks died in the Valhalla train crash.  He was riding home in the front car of his train, which his brother says he likely did to take advantage of the quieter atmosphere, when it struck an SUV at a grade crossing north of Valhalla,  south of the Chappaqua station. The train dragged the SUV while it came to a stop, loosening segments of the third rail that accumulated in the front car. Dirks, the SUV driver, and four other passengers were killed, making it the deadliest accident in Metro-North's history.
Reactions to his death came from many quarters, many paying tribute to his scientific prowess. His father recalled that "he always got everything the first time. He always excelled." Greg Sampson, Dirks' math teacher at Lewis and Clark, remembered when his student had finished an advanced class in trigonometry in just two weeks, something no other student of his has ever done, saying "he was just an amazing, amazing student." Niles Pierce recalled how Dirks was willing to take a chance on working with a younger professor. His former postdoc was, he said, "an unusual student, even for Caltech... He did remarkable things." D. E. Shaw Research, his employer, called him "a brilliant scientist who made tremendous contributions to our own research, and to the broader scientific community."
In April 2015, the International Society for Nanoscale Science, Computation, and Engineering (ISNCSE), the main scientific society for DNA nanotechnology and DNA computing, established the Robert Dirks Molecular Programming Prize to recognize early-career scientists for molecular programming research.  The first prize was awarded in 2016.  As of June 2016, fundraising to establish a $100,000 endowment was ongoing.