Well I wouldn't put a raised bed directly against a fence in case it needed mending/maintenance at some point in the future, but if you really must it will need lining as the wet soil will rot it.
You will definitely need to put some protection between the raised bed and the fence otherwise the soil will quickly rot the base of your new fence. A very thick layer of black polythene pond liner should prove effective..