The anomalous thermal expansion in a layered 3$d$-5$d$ based triple perovskite iridate Ba$_{3}$CoIr$_{2}$O$_{9}$ is investigated using high resolution synchrotron diffraction. Below the magneto-structural transition at 107,K, the onset of antiferromagnetic order is associated with a monoclinic distortion of the hexagonal structure. Deeper within the magnetically ordered state, a part of the monoclinic phase distorts even further, and both these structural phases co-exist down to the lowest measured temperatures. We observe negative thermal expansion in this phase co-existence regime, which appears to be intimately connected to the temperature driven relative fractions of these monoclinic phases. The significant NTE observed in this system could be driven by magnetic exchange striction, and is of relevance to a number of systems with pronounced spin orbit interactions.