The interaction between an ultrastrong laser and a cone-like target is an efficient approach to generate high-power radiations such as attosecond pulses and terahertz waves. The objective is to study the γ-ray generation under this configuration with the help of 2D particle-in-cell simulations. It is deciphered that electrons experience three stages, including injection, acceleration and scattering, to emit high-energy photons via nonlinear Compton scattering (NCS). These spatial-separated attosecond γ-ray pulses own high peak brilliance (>1022 photons/(s·mm2·mrad2·0.1%BW)) and high energy (6 MeV) under the case of normalized laser intensity a0=30(I=2×1021 W/cm2). In addition, the cone target turns out to be an order of magnitude more efficient in energy transfer compared to a planar one.