The invention relates to a portable noninvasive real-time photoacoustic viscoelastic detector which comprises a semiconductor laser, an electrooptical modulator, a function generator, a measuring box, a focusing lens, a rectangular prism group, an ultrasonic transducer, a preposed signal amplifier, a lock-in amplifier and a data acquisition device; along the laser propagation direction, the semiconductor laser, the electrooptical modulator, and the measuring box are orderly arranged; in the measuring box, a laser inlet, the focusing lens, the rectangular prism group, and a laser outlet are arranged in a line; in the measuring box, along the acoustic wave propagation direction, the laser outlet, the rectangular prism group, and the ultrasonic transducer are orderly arranged; the ultrasonic transducer, the preposed signal amplifier, the lock-in amplifier and the data acquisition device are orderly connected electrically; the function generator is respectively connected with the electrooptical modulator and the lock-in amplifier. The invention has the advantages of simple structure, higher measurement precision and sensitivity, and convenient operation, and belongs to the technical field of biomedical detection.