Can I travel to USA from Pakistan on a Pakistani passport from June 26 to July 17,2018 with Passport expiry date of September 17,2018 with a valid US visa. Hope I will be able to board the Qatar airline?
Yes, you can. The rule is that a traveler's passport must be valid for six months beyond the intended period of stay unless the country issuing the passport is in the so-called "six-month club." Pakistan is in the six-month club.
A link to the current list may be found on the Customs and Border Protection website.
For those with passports issued by a country on the list, the passport need only be valid until the traveler's date of departure. In your case, you have two extra months.
If the "admit until" date would normally be after September 17, however, you should expect that it will be September 17 instead. For example, if you're arriving as a B-2 visitor on June 26, you would normally be admitted until December 25 or so, but with a passport expiring on September 17, the stamp will probably say September 17.
As mentioned in a comment, you can also get a new passport. Your visa will remain valid, and you can use the valid visa in your old passport along with your new passport.