Along with the development of 5G, Network Slicing (NS) plays an important role in the application of mobile networks to meet all kinds of personalized requirements. In terms of NS concept, network operators can vertically split a physical network into multiple logically separate networks to flexibly meet Quality of Service (QoS) requirements, which are mainly represented as higher bandwidth and lower latency. In this paper, we propose a novel QoS framework of NS in 5G and beyond networks based on Software Defined Network (SDN) and Network Function Virtualization (NFV) to guarantee key QoS indicators for different application scenarios, such as enhanced Mobile Broad-Band (eMBB), massive Machine-Type Communications (mMTC) and Ultra-Reliable and Low-Latency Communications (URLLC). In this QoS framework, 5G network is divided into three parts, Radio Access Network (RAN), Transport Network (TN) and Core Network (CN) to form three types of NS with different network resource allocation algorithms. The performance evaluation in the simulation environment of Mininet shows that the proposed QoS framework can steer different flows into different queues of Open Virtual Switches (OVS), schedule network resources for various NS types and provide reliable End-to-End (E2E) QoS for users according to preconfigured QoS requirements.