Planar magnetic molecules are of great research interest in the past few years because of their possible application in molecular spintronics. Microscopic understanding of the adsorption and magnetic exchange interaction of these molecules to the metallic/magnetic surfaces may pave the way in developing efficient molecular spin switching devices. Herein, using density functional theory + U calculations, we have studied the structural, electronic, and magnetic properties of a Ni-dinuclear molecule chemically adsorbed on a Co(001) substrate. Switching of the spin and oxidation state of the Ni atom present in the molecule was observed due to the adsorption. We report a strong antiferromagnetic coupling between the spins of the Ni-dinuclear molecule to the ferromagnetic Co(001) substrate. The study reveals an indirect exchange interaction between the magnetic center of the molecule and the substrate Co atoms. The exchange interaction is mediated through the ligands of the molecule that stabilizes the spin moment of the molecule in an antiferromagnetic alignment to the substrate magnetization. Our study also shows that the spin state and strength of MAE of the adsorbed molecule can be tailored through the magneto-chemical method by adding the Cl atom as an axial ligand to the magnetic center of the molecule.