An object of the present invention is to provide a pyrrole derivative useful as an immunosuppressive agent and a method for producing the same. For achieving the object, the present invention provides a method for producing a compound represented by the general formula (I) by heating a compound represented by the general formula (III) and a compound represented by the general formula (IV) in a nonpolar solvent under reduced pressure.