Combine brown sugar, smoked paprika, chili powder, salt, and pepper in a small bowl to make a dry rub.
Coat pork tenderloin in dry rub, using your hands to ensure it is distributed evenly.
Place pork tenderloin in slow cooker; cut in two if it won't fit and nestle the pieces beside each other.
Add onions and garlic to BBQ sauce. If using hot sauce, add it to the BBQ sauce mixture. Stir to combine everything.
Pour BBQ sauce over pork in the slow cooker. Stir gently to ensure the sauce is distributed evenly around and under the pork. (The image below shows the pork before cooking.)
Cook for about 2 to 2 1/2 hours on low, until temperature has reached about 160F. See Notes, below.
Remove the tenderloin from slow cooker, shred, then return to slow cooker and toss with sauce. To ensure it is nice and hot, you can put the lid on and let it cook on high heat for about 10 minutes. Serve with biscuits, crusty bread, or over rice.