1. A memory controller comprising: a distribution acquisition unit configured to acquire a distribution of threshold voltages of a plurality of memory cells from a nonvolatile memory, the nonvolatile memory including the plurality of memory cells; an identification unit configured to identify a malfunction state occurring in the nonvolatile memory based on a shape of the distribution; and a setting unit configured to set a read voltage when data is read out of the nonvolatile memory to a voltage value corresponding to a type of the malfunction state.