Diverse studies have shown the high toxic effects of many substances, in particular 2,4-dichlorophenols, which are considered as possible cancer agents. In recent years, many research projects have shown the possibility of using chemically modified electrodes (CME) as sensors for a variety of dangerous substances. Recently, macrocycles, such as porphyrins and their metal complexes, have also been used as sensors because of their high stability and selectivity. This article shows the results of applying a direct electrochemical procedure to obtain a nickel complex of the 5,10,15,20-tetrakis(p-hydroxyphenyl) porphyrin) and the use of this complex as a chemical modifier of electrode surfaces to detect organic contaminants. The electrochemical behavior of the 5,10,15,20-tetrakis(p-hydroxyphenyl) porphyrin is studied using the voltammetric technique. The results show that this porphyrin is highly electroactive in the range of applied potentials and undergoes redox processes associated with hydroxyl groups and porphyrin rings. The dark purple nickel-porphyrin complex (electrosynthetized complex or EC) was obtained by direct electrochemical synthesis for 15 min using a sacrificial nickel anode at a controlled current of 20 mA; the electrochemical efficiency was 86.95%. The product was analyzed using IR and 1H-NMR spectroscopy, atomic absorption, HPLC with an UV-detector, and X-ray diffraction. Using cyclic voltammetry, a comparative study of the EC and its equivalent commercial nickel metalloporphiryn (NiP) was also carried out. The results show that EC contains the nickel atom bonded with the macrocycle molecule through the oxygen atoms located in its external part. The EC obtained was used to modify a glass carbon electrode (GCE) by chemisorption at pH values of 7 and 11. The capacity of the modified electrode to detect 2,4-dichlorophenol was determined. The results show that the EC modifies the electrode surface at both pH values; the electrode, modified with EC at pH 11, is able to detect 2,4-dichlorophenol and, additionally, to electrocatalyze its oxidation.