The invention proposes a random scattering medium based controllable sub-wavelength maskless photoetching system and method, which is used for solving the technical problem of high cost, low time efficiency and low resolution of a photoetching technology. A spatial light modulator I is used for generating a target pattern, a light wave passes through the spatial light modulator I and then is incident to a surface of a random scattering medium, the random scattering medium is used for random coding of light, a spatial light modulator II is used for compensating phase distortion generated by the random scattering medium, and finally, sub-wavelength imaging through the scattering medium is achieved, an arbitrary controllable sub-wavelength digital mask is formed for projection exposure. By the system and the method, the fabrication of a mask is avoided, and the photoetching cost is greatly reduced; with the combination of random coding of the random scattering medium and phase compensation of the spatial light modulation, the photoetching resolution is improved; and only one time of phase calibration process is required, the photoetching time efficiency is improved, and thus, the maskless photoetching of a controllable sub-wavelength pattern is achieved.