Using the AKSZ formalism, we construct the Batalin-Vilkovisky master action for the Rozansky-Witten model, which can be defined for any complex manifold with a closed (2,0)-form. We also construct the holomorphic version of Rozansky-Witten theory defined over Calabi-Yau 3-fold.