A polyimide resin comprising a repeating structural unit represented by the following formula, a repeating structural unit represented by the following formula, and a repeating structural unit represented by the following formula or a repeating structural unit represented by the following formula, a content ratio of the repeating structural unit of formula with respect to the total of the repeating structural unit of formula and the repeating structural unit of formula being from 40 to 70 mol%, and a content ratio of the repeating structural unit of formula or the repeating structural unit of formula with respect to the total of the repeating structural unit of formula and the repeating structural unit of formula being more than 0 mol% and 25 mol% or less: wherein R 1 represents a divalent group having from 6 to 22 carbon atoms containing at least one alicyclic hydrocarbon structure; R 2 represents a divalent chain aliphatic group having from 5 to 20 carbon atoms; R a represents a divalent group containing at least one aromatic ring which is bonded to a monovalent or divalent electron-attracting group; R b represents a divalent group containing -SO 2 - or -Si(R x)(R y)O- wherein R x and R y each independently represent a chain aliphatic group having from 1 to 3 carbon atoms, or a phenyl group; and X 1, X 2, X a, and X b each independently represent a tetravalent group having from 6 to 22 carbon atoms containing at least one aromatic ring. a content ratio of the repeating structural unit of formula with respect to the total of the repeating structural unit of formula and the repeating structural unit of formula being from 40 to 70 mol%, and a content ratio of the repeating structural unit of formula or the repeating structural unit of formula with respect to the total of the repeating structural unit of formula and the repeating structural unit of formula being more than 0 mol% and 25 mol% or less: wherein R 1 represents a divalent group having from 6 to 22 carbon atoms containing at least one alicyclic hydrocarbon structure; R 2 represents a divalent chain aliphatic group having from 5 to 20 carbon atoms; R a represents a divalent group containing at least one aromatic ring which is bonded to a monovalent or divalent electron-attracting group; R b represents a divalent group containing -SO 2 - or -Si(R x)(R y)O- wherein R x and R y each independently represent a chain aliphatic group having from 1 to 3 carbon atoms, or a phenyl group; and X 1, X 2, X a, and X b each independently represent a tetravalent group having from 6 to 22 carbon atoms containing at least one aromatic ring. R 1 represents a divalent group having from 6 to 22 carbon atoms containing at least one alicyclic hydrocarbon structure; R 2 represents a divalent chain aliphatic group having from 5 to 20 carbon atoms; R a represents a divalent group containing at least one aromatic ring which is bonded to a monovalent or divalent electron-attracting group; R b represents a divalent group containing -SO 2 - or -Si(R x)(R y)O- wherein R x and R y each independently represent a chain aliphatic group having from 1 to 3 carbon atoms, or a phenyl group; and X 1, X 2, X a, and X b each independently represent a tetravalent group having from 6 to 22 carbon atoms containing at least one aromatic ring.