The second-generation high-temperature superconducting (HTS) coated conductor has been recognized as one of the most promising materialsfor high field magnets due to its superior electromagnetic and mechanical performances. HTS racetrack coils wound with the coated conductors are an extensively used configuration in engineering applications, such as HTS machines and high-speed maglevs. In this paper, in order to analyze the electromagnetic and mechanical behaviors of HTS racetrack coils, a 3D coupled electromagnetic-mechanical model is used to consider the effect of coil deformation and the strain dependence of critical current. The effectiveness of the coupled model is validated by comparing the numerical results with experimental data in the literature. A numerical simulation of a 3D HTS racetrack coil subjected to an external electromagnetic field is carried out using coupled and uncoupled models. The results indicate that the structure deformation can reduce the penetration depth of the screening current, and the hoop stress and strain are mainly concentrated on the circular part of the racetrack coil. Afterwards, the influences of various parameters on the electromagnetic and mechanical responses of the HTS racetrack coil are also investigated.