There is provided an axial piston device that includes a housing, a rotary
shaft, a cylinder block, and a piston. The housing includes a housing
body opened at a first end thereof and a plate disposed at the first end
of the housing body. The rotary shaft is rotatably supported about an
axis by the housing body and the plate. The cylinder block is rotated
together with the rotary shaft and is accommodated inside the housing.
The piston is accommodated in the cylinder block in slidable a manner in
an axial direction. Furthermore, the plate is provided with a pair of
first oil passages having first ends communicating with a discharge port
and a suction port of the cylinder block and second ends opened to the
surface of the plate, and a drain oil passage for allowing at least one
of the first oil passages to communicate with an oil sump. The drain oil
passage is provided with a rotary valve which can selectively switch a
shutoff position at which the drain oil passage is shut off and a
communication position at which the drain oil passage is communicated.