Make sure that there are no conflicts, otherwise the last file you move will silently overwrite a previously-moved file with the same name. Pass the -i option to mv (i.e. mv -i */* .) to be prompted in case of a conflict.

You can then remove the subdirectories:

rmdir */

If you get an error telling you that the command line is too long, you'll have to do it in several steps. The easy way is with the find command: