The invention discloses a log storage method and system based on a data center. The method comprises the following steps that the management server receives a network access request of the service server; after the verification is legal, the service server is allowed to join the block chain network, receive a log file sent by a service server of the block chain network, sort all the received log files according to the log generation time, process the log files to generate a local new block, and broadcast a new block which is signed by a target service server private key and carries a target service server identifier to the block chain network by the related target service server; And each service server deletes log files repeatedly stored in the local server according to the target log files recorded in the new block. Therefore, the block chain network is formed by the servers in the data center, the log files are stored in a distributed mode, the safety of the log files is protected,a firewall mechanism of the data center is spanned, and operability is high.