Provided are a method and device for ultrasonic imaging by synthetic focusing. The method comprises: exciting a plurality of matrix elements of an ultrasonic probe to transmit plane waves many times, wherein transmitting apodizations at the time of every transmission of the plane waves by the plurality of matrix elements are corresponding to the respective lines in a measurement matrix in which elements are randomly distributed after every transmission of the plane waves, exciting all the matrix elements of the ultrasonic probe to receive echo signals, in order to obtain channel data recovering a synthetic focusing channel data set by use of a compressed sensing reconstruction algorithm according to a channel data set and the measurement matrix and subjecting the synthetic focusing channel data set to beamforming to generate an ultrasonic image. Ultrasonic images obtained by the abovementioned method and device are not only quite high in resolution, but also have the advantages of high frame frequency and high contrast ratio due to the fact that ultrasonic waves are less transmitted and high energy is present in every transmission.