As far as I know this can't be done, at least not all the way. The only way to include an ASP.NET control in a class library is to convert your User Control to a Server Control which is a lot work (but usualy possible), especially if you are also learning Server Control development at the same time. DNN has several server controls that they use, see the WebControls project code and the code for the User Properties controls in the Controls\PropertyEditor\Edit Controls foler of the Library project for some good examples.
The most you can do is move your code behind into a class library which is the approach that DNN takes for a lot of stuff. The code behind for all the controls in the "controls" folder of the web site (labelcontrol.ascx, urlcontrol.ascx, etc) is in the Library project in the "controls" folder (along with a lot of other stuff as well). The Library project assembly ends up in the web site's bin folder via the build process so when ASP.NET goes looking for the code behind class it finds it in that class library. In other ASP.NET projects you can also do some tricks with pre-compiling the web site where you end up with all the ASCX "code" in an assembly but DNN does not support pre-compiling so those options are not available.