The invention relates to a non-contact ground stress testing device and method based on drilling microscopy digital photography and belongs to ground stress measuring device and method of geotechnical engineering. The device comprises an electronic microscopy camera, a signal processing and control module, a signal transmission module, a gyroscope, a signal collecting module, a portable power source and a device shell. The method includes: fixing the testing device in a device mounting hole, using the electronic microscopy camera to collect the hole wall digital images of the hole during a whole stress relieving process, selecting the representative images before and after the stress relieving, acquiring sub-pixel images through image interpolation, optimizing sub-pixel image analyzing areas and points, setting analyzing traces, calculating to obtain strain values, and calculating the ground stress values and the azimuth angles thereof by the hole partial wall surface stress relieving method theory. The non-contact ground stress testing device and method has the advantages that simple operation and high adaptability are achieved, testing precision can reach one micro strain, strain measuring mark points and analyzing traces are optimized, influence of temperature, rock viscosity and electromagnetic interference is avoided, a probe can be reused, and low cost is achieved.