Provided is a method for producing a compound represented by a formula (6), the method comprising: a step of mixing a compound represented by a formula (4) and a compound represented by a formula (5) to form a salt consisting of the compound represented by the formula (4) and the compound represented by the formula (5); and a step of removing a protecting group P1 of the salt. In the following formulae, P1 is a protecting group and P2 is a protecting group.