A copper alloy for an electric and electronic device, the copper alloy comprising: Zn at higher than 2 mass% and lower than 23 mass%; Sn at 0.1 mass% or more and 0.9 mass% or less; Ni at 0.05 mass% or more and lower than 1.0 mass%; Fe at 0.001 mass% or more and 0.08 mass% or less; P at 0.005 mass% or more and 0.1 mass% or less; optionally Co at 0.001 mass% or more and lower than 0.1 mass%; and the balance being Cu and unavoidable impurities, wherein a ratio (Fe+Co)/Ni of a total content of (Fe+Co) of Fe and Co to a Ni content satisfies 0.002≤(Fe+Co)/Ni<1.5 by atomic ratio, a ratio (Ni+Fe+Co)/P of a total content (Ni+Fe+Co) of Ni, Fe, and Co to a P content satisfies 3<(Ni+Fe+Co)/P<15 by atomic ratio, a ratio Sn/(Ni+Fe+Co) of a Sn content to the total content (Ni+Fe+Co) of Ni, Fe, and Co satisfies 0.3<Sn/(Ni+Fe+Co)<5 by atomic ratio, and a special grain boundary length ratio, Lσ/L, is 10% or more, Lσ/L being a ratio of Lσ to L, Lσ being a sum of each grain boundary length of: Σ3; Σ9; Σ27a; and Σ27b special grain boundaries in α phase crystal grains wherein the Σ value is defined based on the CSL theory, and L being a length of all crystal grain boundaries in α phase crystal grains, in a case where an α phase containing Cu, Zn and Sn within a measurement area of 1000 μm 2 or larger is measured by EBSD method with a measurement interval of 0.1 μm a step; data analysis is performed excluding measurement points with a CI (confidence index) value at 0.1 or less, the CI value being analyzed by a data analysis software OIM (orientation imaging microscopy); and a grain boundary is identified between adjacent measurement points with a misorientation exceeding 15°. Zn at higher than 2 mass% and lower than 23 mass%; Sn at 0.1 mass% or more and 0.9 mass% or less; Ni at 0.05 mass% or more and lower than 1.0 mass%; Fe at 0.001 mass% or more and 0.08 mass% or less; P at 0.005 mass% or more and 0.1 mass% or less; optionally Co at 0.001 mass% or more and lower than 0.1 mass%; and the balance being Cu and unavoidable impurities, wherein a ratio (Fe+Co)/Ni of a total content of (Fe+Co) of Fe and Co to a Ni content satisfies 0.002≤(Fe+Co)/Ni<1.5 by atomic ratio, a ratio (Ni+Fe+Co)/P of a total content (Ni+Fe+Co) of Ni, Fe, and Co to a P content satisfies 3<(Ni+Fe+Co)/P<15 by atomic ratio, a ratio Sn/(Ni+Fe+Co) of a Sn content to the total content (Ni+Fe+Co) of Ni, Fe, and Co satisfies 0.3<Sn/(Ni+Fe+Co)<5 by atomic ratio, and a special grain boundary length ratio, Lσ/L, is 10% or more, Lσ/L being a ratio of Lσ to L, Lσ being a sum of each grain boundary length of: Σ3; Σ9; Σ27a; and Σ27b special grain boundaries in α phase crystal grains wherein the Σ value is defined based on the CSL theory, and L being a length of all crystal grain boundaries in α phase crystal grains, in a case where an α phase containing Cu, Zn and Sn within a measurement area of 1000 μm 2 or larger is measured by EBSD method with a measurement interval of 0.1 μm a step; data analysis is performed excluding measurement points with a CI (confidence index) value at 0.1 or less, the CI value being analyzed by a data analysis software OIM (orientation imaging microscopy); and a grain boundary is identified between adjacent measurement points with a misorientation exceeding 15°.