Massive multiple-input multiple-output (MIMO) systems are strong candidates for future fifth generation (5G) heterogeneous cellular networks. For 5G, a network densification with a high number of different classes of users and data service requirements is expected. Such a large number of connected devices needs to be separated in order to allow the detection of the transmitted signals according to different data requirements. In this paper, a decoupled signal detection (DSD) technique which allows the separation of the uplink signals, for each user class, at the base station (BS) is proposed for massive MIMO systems. A mathematical signal model for massive MIMO systems with centralized and distributed antennas in heterogeneous networks is also developed. The performance of the proposed DSD algorithm is evaluated and compared with existing detection schemes in a realistic scenario with distributed antennas. A sum-rate analysis and a computational cost study for DSD are also presented. Simulation results show an excellent performance of the proposed DSD algorithm when combined with linear and successive interference cancellation detection techniques.