A Gemini zwitterionic viscoelastic surfactant named self diverting acid ‐ gemini sulfonated surfactant (SDA‐GS), which has double quaternary ammonium groups, double sulfonate groups, and two hydrophobic tails, was synthesized from oleylamidopropyl dimethylamine, 1,3‐propanesultone, and 2, 2‐bis(bromomethyl)propane‐1, 3‐diol. The viscosity of an SDA‐GS aqueous solution varies with acid and calcium chloride concentrations. With a decrease in the HCl concentration, the viscosity of the acid solution prepared with SDA‐GS increases to a maximum value, followed by a decrease, which results from the aggregation of the surfactant into wormlike micelles and the following disaggregation. Calcium ions generated by the reaction of acid and calcium carbonate can enhance the aggregation of the surfactant to increase the peak viscosity of the acid solution. The peak viscosity of the acid solution prepared by 5 wt.% SDA‐GS without calcium ions could only reach 73.2 mPa.s when the HCl concentration was 4 wt.%, but that of the acid solution with calcium carbonate powder added could reach over 200 mPa.s when the HCl concentration was consumed to 4 wt.% and the calcium chloride concentration 21.6 wt.%. The viscoelastic measurements proved that calcium ions can drive the growth of the wormlike micelle. The acid and Ca2+ response of SDA‐GS can be applied in self‐diverting acid to improve the acid displacement in the heterogeneous reservoir. Experimental evaluation showed that the acid solution prepared by SDA‐GS and the selected corrosion inhibitor showed a good corrosion inhibition performance and a viscosity variation that makes it an efficient self‐diverting acid. The spent acid (21.6 wt.%) with 4 wt.% HCl retained high viscosity over 80 mPa.s at a 170 s−1 shearing rate and at 120°C after 90 min. The parallel core flood tests to simulate in situ application of SDA‐GS acid showed that the permeability improvement ratios (K1/K0) of the cores could reach 182.3 and 278.4 at 60 and 90°C, respectively.