This article includes the synthesis of heterocyclic azo dye of theophylline by coupling diazonium salt of 4-chloroaniline with theophylline which is, namely, 8-(1-(4-chlorophenyl)azo)theophylline (CPAT). The complexes of cobalt and nickel were prepared by reacting their ions with CPAT ligand in ethanol under 1 : 2 ratio metal-ligand. The CPAT ligand and its complexes were characterized by elemental analysis, infrared spectrometry, electronic absorption spectroscopy, molar conductivity, and magnetic moment. The cobalt and nickel complexes show octahedral geometry having general formula [M(CPAT)2Cl2]. This article addresses the properties of CPAT dye such as photochromic properties. The CPAT dye exhibited obvious and desired changes under irradiation with visible light (405 nm), high sensitive for pH changes which refer to its ability to be analysis indicator. CPAT dye exhibited solvatochromic properties presenting red shift with polar solvent. The CPAT and its complexes show interesting antibiological activities towards Staph. aureus and E. coli bacteria and Aspergillus fungi.