The invention discloses a distributed storage method and a distributed storage device based on network coding, and belongs to the technical field of computer storage. The method and the device solve the problem that disk IO (Input/Output) of storage nodes is too large in the existing distributed storage method based on the network coding. The distributed storage method is suitable for a distributed storage system, and comprises the steps of data coding, data decoding and data repair. The distributed storage device comprises a data coding module, a data decoding module and a data repair module. According to the method and the device, when a data node is damaged, data not more than the size of a primary file D is downloaded from d data nodes, and the damaged data is repaired, so that the repair band width is reduced effectively; and randomly selected gamma coded data blocks are downloaded directly from the d data nodes, and the data blocks are not subjected to linear operation in the data nodes, so that the disk IO of the storage nodes can be reduced on the premise that the high usability of the data is ensured, and the disk IO efficiency of the data nodes is improved effectively.