The design of high-performance electrocatalysts for the ammonia oxidation reaction and the detection of ammonia-nitrogen has always been paid attention due to the potential benefits in regards to direct ammonia fuel cells and environmental protection. Therefore, in this work, we designed and constructed one self-supported electrode by electrodepositing PtNi alloy nanosheets on a carbon cloth substrate. To obtain high-performance PtNi alloy nanosheets, the ratio of H2PtCl6.6 H2O/Ni(NO3)2.6 H2O and deposition time were controlled. The electrochemical catalytic performances for the ammonia oxidation reaction indicated that the best ratio of H2PtCl6.6 H2O/Ni(NO3)2.6 H2O was 3:1 and the best deposition time was 2000 s, achieving a low onset potential with the value of-0.51 V and a high peak current of 36.57 mA. In addition, the electrochemical detection of ammonia-nitrogen also showed great performances with an outstanding sensitivity of 0.0102 mA mu M- 1 and a low detection limit with the value of 1.154 mu M. Moreover, exceptional selectivity, robust reproducibility, excellent reusability, strong stability, and impressive recovery during the analysis of real sample types such as tap water, lake water, and sea water were observed. Therefore, the work provided one potential electrocatalyst for bifunctional applications involving both the ammonia oxidation reaction and ammonia-nitrogen detection.