The pivotal moment occurs in the two-part Season 6 episode "Niagara" (Episodes 4 & 5, aired October 2009).
During Jim and Pam's wedding weekend at Niagara Falls, Michael Scott (Steve Carell) and Holly Flax (Amy Ryan)—reunited after her transfer back to Nashua—spend the night together. It marks the start of their genuine, mature relationship, ultimately leading to Michael's departure for Colorado to be with Holly, one of the series' most satisfying character exits.