It should be noticed that the hydrostatic-driven electric generators aforementioned are mostly composed of independent hydrostatic motors and coaxially coupled generators. This configuration usually has large volume and is prone to suffering difficulties when there is limited space such as mobile machinery and vehicles. Therefore, it is necessary to develop more compact components. There have been several literatures about integrated energy conversion devices between hydrostatic energy and electrical energy. The shaft of a permanent magnet electric machine is directly operated on the shaft of a hydrostatic pump/motor so that a coupling is eliminated, and losses analysis and efficiency measurements are also presented in detail [20], [21]. The literature [22] studies a compact machine where an induction motor and a vane pump are integrated together,and a port-plate centrifugal pump is specially designed to improve suction performance. The literature [23] and [24] propose the combination of a permanent magnet electric machine and an axial piston hydrostatic machine, as well as investigations on energy conversion efficiency and coupling effects. However,there are few literatures involved in the subjects of highly integrated structure and parameter design, especially about the hydrostatic-driven electric generator.This paper presents a compact hydrostatic-driven electric generator, which can be employed to convert hydrostatic energy to electrical form directly. The compact structure is realized by mounting a Halbach permanent magnet array which has self-shielding magnetic property on the barrel surface of an axial piston hydrostatic motor. Main parameters are determined based on the analysis of dimensional and mechanical constraints, and electromagnetic performance. A prototype is fabricated and experiments under both no-load and loaded conditions are carried out. The results show that the prototype has expected performances on machine volume,generation quality, output voltage stiffness, efficiency, etc.The rest of the paper is organized as follows. Structure, parameter design, and prototype are presented in Section II. Experimental investigation and discussion are presented in Section III,and conclusions are drawn in Section IV.