Yes, detergents do expire. Some liquid detergents list a “best used by” date. If you don’t find one, use this rule of thumb: unopened, the container is good for 9 months to 1 year. After opening, use within 6 months.
The same time frame applies to powdered detergents unless they have been exposed to moisture. If powdered detergent become hard or cakey, discard it because it probably won’t dissolve correctly in the wash leaving soap deposits on your clothing.
Specific questions? Just ask here.