The massive device’s connectivity and the great data traffic demand are growing explosively in our daily lives, especially in the Internet of Things environment. For this purpose, the main objective of operators is to find the most innovative and powerful solution that can support all these needs. The sliced fifth-generation mobile network (sliced 5G) is considered a promising architecture using a new radio access technology called New Radio (NR), which can offer significantly higher data rate experiences. In addition, using Network Slicing (NS) architecture will allow more flexibility and isolation to the predefined infrastructure. The NS isolation effect’s benefit is eliminating inter-slices interference since they will be independent of each other. This paper aims to resolve the user-association problem in a sliced 5G (NR)-IoT network. Hence, the problem is formulated as an Unconstrained-Markov Decision Process (U-MDP) model. Then, the U-MDP association algorithm is proposed to find the optimal association among users and the different slices. Numerical simulation results validate the theoretical proposed model and prove her efficiency in improving the global system performance while respecting all devices’ Quality of Service.