The visa expiration date is only relevant for entry into the U.S. As long as you travel to the U.S. on the same purpose of stay within the validity of your visa, you can still use the visa. You can depart after the expiration of the visa, the customs official will determine the length of stay of admission at the port of entry.
Upon arriving at a port-of-entry, Custom and Border Protection (CBP) Officer will provide each traveler with an admission stamp that is annotated with date of admission, class of admission and admitted until date (date on or before which you must exit the U.S.). Please be informed that the decision whether to admit the visa holders into the U.S. and how long they will be authorized to stay is within the discretion of the immigration inspector.